Skip to content
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
56 changes: 56 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy Documentation (GitHub Pages)

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: write

jobs:
build-and-deploy:
name: Build Doxygen and deploy to GitHub Pages
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
# The full history is required to compute the
# 0.<commit-count>.<short-sha> project version.
fetch-depth: 0
# The CMake submodule provides the Doxygen style sheet
# (submodules/CMake/DoxyStyle/doxygenStyles.css).
submodules: recursive

- name: Install Doxygen and Graphviz
uses: doxygen/setup-doxygen@v2

- name: Generate the Doxygen configuration file
run: |
PROJECT_VERSION="0.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
sed -e "s|@PROJECT_NAME@|easyssl|" \
-e "s|@EASYSSL_VERSION@|${PROJECT_VERSION}|" \
doxygen.conf.in > doxygen.conf
grep -E '^(PROJECT_NAME|PROJECT_NUMBER)' doxygen.conf

- name: Generate Doxygen HTML documentation
run: doxygen doxygen.conf

- name: Stage the website
run: |
mkdir -p stage/doc
cp pages/index.html stage/index.html
cp -r docs/. stage/doc/
# Remove the raw markdown documents from the staged docs folder:
# they are not part of the generated documentation.
rm -f stage/doc/USAGE.md stage/doc/MIGRATION_FROM_QT_SECRET.md
ls -la stage stage/doc | head -30

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: stage
clean: true
79 changes: 75 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,41 @@ This library contains interfaces for the signing and encryption data.
```
* rebuild your project

### qmake

* cd yourRepo
* git submodule add https://github.com/QuasarApp/easyssl.git # add the repository of EasySSL into your repo like submodule
* git submodule update --init --recursive
* Include in your `.pro` file the EasySSL sources directly:

```qmake
# myapp.pro

QT += core network

INCLUDEPATH += $$PWD/../easyssl/src/lib/src/public

SOURCES += \
../easyssl/src/lib/src/public/easyssl.cpp \
../easyssl/src/lib/src/public/easyssl/icrypto.cpp \
../easyssl/src/lib/src/public/easyssl/ecdsassl.cpp \
../easyssl/src/lib/src/public/easyssl/rsassl.cpp \
../easyssl/src/lib/src/public/easyssl/x509.cpp \
../easyssl/src/lib/src/public/easyssl/icertificate.cpp \
../easyssl/src/lib/src/private/easysslutils.cpp

DEFINES += EASYSSL_LIBRARY

# Link the OpenSSL 3.0+ libraries:
LIBS += -lcrypto -lssl
```

* rebuild your project

> **Note:** the CMake build is the recommended way. The EasySSL library has the
> `EASYSSL_STATIC_SSL` and `BUILD_WITH_OPENSSL` build options that are only
> available for the CMake build.

### Independent of SSL build
Dependency on the ssl library greatly complicates the deployment of the final product. For fix this issue, you can build EasySSL library with static SSL library. In this case, SSL library code will be saved in your EasySSL binary, and deploy of your application will be easily. The ssl code will not available for your application or other libraries, so you will not get conflicts between different major versions ssl libraries if your distribution kit has it.

Expand All @@ -42,6 +77,39 @@ cmake .. -DEASYSSL_STATIC_SSL=1

The described case may be useful for the Qt 5.15.x, because the QNetwork 5.15 depends on the SSL v1.1 and EasySSL works with the SSL >= 3.0.

### Build without the system OpenSSL (BUILD_WITH_OPENSSL)

If your system (or the target device) has no OpenSSL 3.0+ library, you can
build the OpenSSL library together with the EasySSL library. Just set the
**BUILD_WITH_OPENSSL** option to true:

``` bash
cmake .. -DBUILD_WITH_OPENSSL=1
```

In this case the EasySSL project clones the OpenSSL `openssl-3.0.9` sources,
builds the static OpenSSL libraries and links them privately into the EasySSL
binary. So your application has no runtime dependency on the system OpenSSL.

* Supported platforms: Linux, Windows (MinGW), Android, iOS and macOS (arm/x86).
* The WASM platform is **not** supported.
* On Windows the build requires the MinGW (GNU) compiler and the
`mingw32-make` tool. The OpenSSL Configure script also requires a perl
that produces Unix-like paths and that provides the perl core modules
(for example the MSYS2 perl; set the `MSYS2_ROOT` environment variable
to the MSYS2 installation directory if it is not found automatically).
* The OpenSSL version can be changed with the `EASYSSL_OPENSSL_TAG` option
(default `openssl-3.0.9`).

### Unit tests

The unit tests of the EasySSL library are built and run by default. To
disable the tests, set the **EASYSSL_TESTS** option to false:

``` bash
cmake .. -DEASYSSL_TESTS=0
```

## Usage

### Encryption
Expand Down Expand Up @@ -113,12 +181,15 @@ edsa.auth(1000, &userID);

## Documentation

* [Usage and working examples](docs/USAGE.md) — build with CMake and qmake,
RSA/ECDSA examples, X509 certificates, async authentication.
* [Migration from the Qt-Secret library](docs/MIGRATION_FROM_QT_SECRET.md) —
* [EasySSL on the web](https://quasarapp.github.io/easyssl/) — the GitHub
Pages site of this repository: the landing page and the full API reference
generated automatically with Doxygen.
* [Usage and working examples](https://github.com/QuasarApp/easyssl/blob/main/docs/USAGE.md) —
build with CMake and qmake, RSA/ECDSA examples, X509 certificates, async authentication.
* [Migration from the Qt-Secret library](https://github.com/QuasarApp/easyssl/blob/main/docs/MIGRATION_FROM_QT_SECRET.md) —
API mapping, before/after code examples, key and signature format changes.

## Do not forget to help us make this library better...
See our main documentation about contributing to [EasySSL](https://github.com/QuasarApp/easyssl/blob/main/CONTRIBUTING.md)

Full documentation available [here](https://quasarapp.ddns.net:3031/docs/QuasarApp/easyssl/latest/index.html)
Full documentation and the API reference available on the [EasySSL GitHub Pages](https://quasarapp.github.io/easyssl/) site.
11 changes: 8 additions & 3 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,13 @@ binary. The built OpenSSL libraries are saved in the build directory
on the system OpenSSL libraries and you will not get conflicts between
different major versions of the SSL libraries.

* Supported platforms: Linux, Android, iOS and macOS (arm/x86).
* The Windows and WASM platforms are **not** supported.
* Supported platforms: Linux, Windows (MinGW), Android, iOS and macOS (arm/x86).
* The WASM platform is **not** supported.
* On Windows the build requires the MinGW (GNU) compiler and the
`mingw32-make` tool. The OpenSSL Configure script also requires a perl
that produces Unix-like paths and that provides the perl core modules
(for example the MSYS2 perl; set the `MSYS2_ROOT` environment variable
to the MSYS2 installation directory if it is not found automatically).
* The OpenSSL version can be changed with the `EASYSSL_OPENSSL_TAG` option
(default `openssl-3.0.9`).

Expand Down Expand Up @@ -351,7 +356,7 @@ int main() {

## More information

* Full doxygen documentation: [here](https://quasarapp.ddns.net:3031/docs/QuasarApp/easyssl/latest/index.html)
* Full doxygen documentation: [here](https://quasarapp.github.io/easyssl/doc/)
* Migration from the Qt-Secret library: [MIGRATION_FROM_QT_SECRET.md](MIGRATION_FROM_QT_SECRET.md)
* Contributing: [CONTRIBUTING.md](../CONTRIBUTING.md)

Loading
Loading