diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 25738a5..9c85dfa 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -17,4 +17,21 @@ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | d chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \ apt update && \ - apt install -y gh \ No newline at end of file + apt install -y gh + +# Install openssl 3.1+ +RUN git clone git://git.openssl.org/openssl.git +RUN cd openssl && \ + git checkout openssl-3.1.4 && \ + ./config && \ + make && \ + make install && \ + ln -sf /usr/local/lib64/libssl.so.3 /usr/local/lib/libssl.so && \ + ln -sf /usr/local/lib64/libcrypto.so.3 /usr/local/lib/libcrypto.so && \ + ln -sf /usr/local/lib64/libssl.so.3 /usr/lib/x86_64-linux-gnu/libssl.so && \ + ln -sf /usr/local/lib64/libcrypto.so.3 /usr/lib/x86_64-linux-gnu/libcrypto.so && \ + echo "/usr/local/lib64" >> /etc/ld.so.conf && \ + ldconfig && \ + cd .. && \ + rm -rf openssl +RUN openssl version diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 92e851d..e41d905 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash sdk_file='qrypt-security-ubuntu.tgz' -curl -s https://qrypt.azureedge.net/sdk/cpp/v0.11.6/qrypt-security-0.11.6-ubuntu.tgz --output $sdk_file +curl -s https://qrypt.azureedge.net/sdk/cpp/v0.11.14/qrypt-security-0.11.14-ubuntu.tgz --output $sdk_file tar -zxvf $sdk_file --strip-components=1 -C QryptSecurity rm -rf $sdk_file diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index cd786b6..3420bcc 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -24,11 +24,30 @@ jobs: sudo apt-get update sudo apt-get -y install git cmake gcc g++ xxd libssl-dev libgtest-dev libcurl4-openssl-dev openssh-server ufw sshpass curl jq + - name: Install OpenSSL + working-directory: ${{github.workspace}} + run: | + git clone git://git.openssl.org/openssl.git + cd openssl + git checkout openssl-3.1.4 + ./config + make + sudo make install + sudo ln -sf /usr/local/lib64/libssl.so.3 /usr/local/lib/libssl.so + sudo ln -sf /usr/local/lib64/libcrypto.so.3 /usr/local/lib/libcrypto.so + sudo ln -sf /usr/local/lib64/libssl.so.3 /usr/lib/x86_64-linux-gnu/libssl.so + sudo ln -sf /usr/local/lib64/libcrypto.so.3 /usr/lib/x86_64-linux-gnu/libcrypto.so + sudo sh -c "echo '/usr/local/lib64' >> /etc/ld.so.conf" + sudo ldconfig + cd .. + rm -rf openssl + openssl version + - name: Download SDK working-directory: ${{github.workspace}} run: | sdk_file='qrypt-security-ubuntu.tgz' - curl -s https://qrypt.azureedge.net/sdk/cpp/v0.11.6/qrypt-security-0.11.6-ubuntu.tgz --output $sdk_file + curl -s https://qrypt.azureedge.net/sdk/cpp/v0.11.14/qrypt-security-0.11.14-ubuntu.tgz --output $sdk_file tar -zxvf $sdk_file --strip-components=1 -C QryptSecurity rm -rf $sdk_file diff --git a/README.md b/README.md index f61c725..3b30855 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This template can be used to create an environment with resources in place to te ## Quickstart ### 1. Create the codespace -Click the `<> Code` dropdown on github and select `Create codespace on main`. This will create a new codespace, which is a sandbox with everything you need to experiment with the Qrypt SDK. Please allow up to 5 minutes for the codespace to set up the environment and build the quickstart. +Click the `<> Code` dropdown on github and select `Create codespace on main`. This will create a new codespace, which is a sandbox with everything you need to experiment with the Qrypt SDK. Please allow up to 15 minutes for the codespace to set up the environment and build the quickstart. ![Codespaces Setup](docs/res/codespace_setup_small.gif) diff --git a/compose/Dockerfile b/compose/Dockerfile index 7deb0e5..b47161f 100644 --- a/compose/Dockerfile +++ b/compose/Dockerfile @@ -26,7 +26,7 @@ WORKDIR /workspace/ # Download SDK RUN sdk_file='qrypt-security-ubuntu.tgz' && \ - curl -s https://qrypt.azureedge.net/sdk/cpp/v0.11.6/qrypt-security-0.11.6-ubuntu.tgz --output $sdk_file && \ + curl -s https://qrypt.azureedge.net/sdk/cpp/v0.11.14/qrypt-security-0.11.14-ubuntu.tgz --output $sdk_file && \ tar -zxvf $sdk_file --strip-components=1 -C QryptSecurity && \ rm -rf $sdk_file diff --git a/docs/QUICKSTART-BUILD.md b/docs/QUICKSTART-BUILD.md index 6da9d3f..bee9d97 100644 --- a/docs/QUICKSTART-BUILD.md +++ b/docs/QUICKSTART-BUILD.md @@ -1,14 +1,18 @@ ## Building this quickstart manually -The QryptSecurity SDK is intended to be run on an Ubuntu 20.04 system with an arm64 architecture, either natively or using an emulated platform. The following commands assume a system configured with OpenSSL, CMake, and g++. +The QryptSecurity SDK is intended to be run on an Ubuntu 20.04 system with an arm64 architecture, either natively or using an emulated platform. The following commands assume a system configured with OpenSSL, CURL, CMake, and g++. +Recommended packages to install: +> apt-get -y install git cmake gcc g++ xxd libssl-dev libgtest-dev libcurl4-openssl-dev openssh-server ufw sshpass curl jq + +Steps: 1. [Create a Qrypt account for free](https://portal.qrypt.com/register). 1. On the Qrypt portal, download the Qrypt SDK from "Products > Qrypt SDK" and save the .tgz to the project root. 1. (Optional) On the Qrypt portal, register a personal access token for keygen. -1. `tar -zxvf qrypt-security-0.11.6-ubuntu.tgz --strip-components=1 -C QryptSecurity` +1. `tar -zxvf qrypt-security-0.11.14-ubuntu.tgz --strip-components=1 -C QryptSecurity` 1. `cmake . -B build` 1. `cmake --build build` 1. `./qrypt --help` -If googletest is installed on your system, you may add `-DBUILD_TESTS=ON` to your cmake command to enable an automated +If googletest is installed on your system, you may add `-DENABLE_TESTS=ON` to your cmake command to enable an automated validation suite which can be run with `./qrypt test`: ![test example](res/rest_run.png) \ No newline at end of file