Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update quickstarts for SDK 0.11.14 #49

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
2 changes: 1 addition & 1 deletion .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion compose/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 7 additions & 3 deletions docs/QUICKSTART-BUILD.md
Original file line number Diff line number Diff line change
@@ -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)