-
Notifications
You must be signed in to change notification settings - Fork 28
Draft: Add openssl debian package #262
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # WolfProvider Debian Packaging | ||
| This is the flow for building and installing | ||
|
|
||
| ## Local build | ||
|
|
||
| From the repo root, run the following command: | ||
| ``` | ||
| ./scripts/build-wolfprovider.sh --debian | ||
padelsbach marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| For a FIPS build, run the following: | ||
| ``` | ||
| ./scripts/build-wolfprovider.sh --debian --enable-fips | ||
| ``` | ||
|
|
||
| The Debian packages are placed in the parent directory, which should be one level above the repo root. | ||
|
|
||
| ## CI build | ||
| Instead of doing a local build as outlined above, we can alternatively use packages generated from CI. | ||
|
|
||
| To use a build from CI for local install, download the artifacts from the Debian CI job. Then install the .deb's from the zip file with `apt` as shown below rather than from the build. | ||
|
|
||
| ## Install | ||
|
|
||
| If not already done, install the WolfSSL Debian package. The non-FIPS version is available in this repo and is installed by the script below. This step is only needed once, and can be done prior to the `build-wolfprovider.sh` step above. | ||
| ``` | ||
| ./debian/install-wolfssl.sh ./.github/packages/debian-wolfssl.tar.gz | ||
| ``` | ||
|
|
||
| For the script above, some systems may require additional packages: | ||
| ``` | ||
| apt install build-essential devscripts dh-exec | ||
| ``` | ||
|
|
||
| ### Optionally install custom OpenSSL | ||
|
|
||
| **Important**: before proceeding with the wolfProvider install, make sure packages are not present: | ||
| ``` | ||
| apt purge -y libwolfprov ; apt purge -y openssl-config ; apt purge -y openssl ; apt purge -y libssl3 | ||
| ``` | ||
|
|
||
| Get the system architecture which determines the library paths for the following steps: | ||
| ``` | ||
| export CURRENT_ARCH=$(dpkg --print-architecture) | ||
| ``` | ||
|
|
||
| Then install the wolfProvider-specific OpenSSL. From the repo root: | ||
| ``` | ||
| apt install ../openssl*${CURRENT_ARCH}*.deb ../libssl3*${CURRENT_ARCH}*.deb | ||
padelsbach marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| Check that the provider API is disabled since wolfProvider is not installed: | ||
| ``` | ||
| $ openssl list -providers | ||
| Could not load libwolfprov.so. Is the libwolfprov package installed? | ||
| libwolfprov.so: cannot open shared object file: No such file or directory | ||
| ``` | ||
|
|
||
| ### Install wolfProvider | ||
|
|
||
| Then install wolfProvider: | ||
| ``` | ||
| apt install ../libwolfprov*${CURRENT_ARCH}*.deb | ||
| ``` | ||
|
|
||
| Confirm that wolfProvider is installed: | ||
| ``` | ||
| $ openssl list -providers | ||
| ``` | ||
|
|
||
| Output should look like this: | ||
| ``` | ||
| Providers: | ||
| default | ||
| name: wolfSSL Provider | ||
| version: 1.0.2 | ||
| status: active | ||
| ``` | ||
|
|
||
| ## Release process | ||
| Always use CI to perform the release build to avoid potential errors from building locally. | ||
|
|
||
| * Tag the wolfProvider repo in the format `vX.Y.Z` | ||
| * The changelog is generated by the Debian scripts | ||
| * Run the Debian job in CI | ||
| * Download the artifacts zip file which contains the .deb's | ||
| * Generate release archives as needed | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| wolfProvider/scripts/build-release.log |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,23 +3,47 @@ Section: libs | |
| Priority: optional | ||
| Maintainer: WolfSSL <[email protected]> | ||
| Standards-Version: 4.6.2 | ||
| Build-Depends: debhelper (>= 12), | ||
| devscripts, | ||
| pkgconf, | ||
| openssl, | ||
| libwolfssl, | ||
| libwolfssl-dev | ||
| Rules-Requires-Root: no | ||
| Build-Depends: | ||
| debhelper-compat (= 13), | ||
| devscripts, | ||
| dh-exec, | ||
| openssl, | ||
| git, | ||
| pkgconf, | ||
| libwolfssl-dev | ||
|
|
||
| Package: libdefault0 | ||
| Section: libs | ||
| Architecture: any | ||
| Multi-Arch: same | ||
| Depends: ${shlibs:Depends}, ${misc:Depends} | ||
| Conflicts: libdefault-wolf0 | ||
| Replaces: libdefault-wolf0 | ||
| Description: Default provider stub library (libdefault) for OpenSSL | ||
| This package provides the default libdefault shared library used by libcrypto. | ||
| It is the baseline/stub implementation intended for systems without wolfProvider. | ||
|
|
||
| Package: libdefault-wolf0 | ||
| Section: libs | ||
| Architecture: any | ||
| Multi-Arch: same | ||
| Depends: ${shlibs:Depends}, ${misc:Depends} | ||
| Conflicts: libdefault0 | ||
| Replaces: libdefault0 | ||
| Description: WolfSSL-backed libdefault replacement for OpenSSL | ||
| This package provides a WolfSSL-backed replacement of libdefault. | ||
| Installing it will replace the stub libdefault, giving precedence to the wolf variant. | ||
|
|
||
| Package: libwolfprov | ||
| Architecture: any | ||
| Depends: ${shlibs:Depends}, ${misc:Depends}, libssl3 (>= 3.0.3), libwolfssl (>= 5.8.2), openssl | ||
| Multi-Arch: same | ||
| Depends: ${shlibs:Depends}, ${misc:Depends}, libssl3 (>= 3.0.3), libwolfssl (>= 5.8.2), openssl, libdefault-wolf0 | ||
| Provides: ${variant:provides} | ||
| XB-Variant: ${variant} | ||
| Description: wolfProvider library for OpenSSL — ${variant:desc} | ||
| wolfProvider is a library that can be used as a Provider in OpenSSL. | ||
| It provides cryptographic functionality through wolfSSL including: | ||
| . | ||
| * Hash functions (MD5, SHA-1, SHA-2, SHA-3) | ||
| * Symmetric encryption (AES, DES) | ||
| * Asymmetric cryptography (RSA, ECC, DH) | ||
|
|
@@ -31,7 +55,40 @@ Description: wolfProvider library for OpenSSL — ${variant:desc} | |
| Package: libwolfprov-dev | ||
| Architecture: any | ||
| Section: libdevel | ||
| Multi-Arch: same | ||
| Depends: libwolfprov (= ${binary:Version}), ${misc:Depends} | ||
| Description: Development files for wolfProvider | ||
| This package contains the header files and development libraries | ||
| needed to build applications using wolfProvider. | ||
| XB-Variant: ${variant} | ||
| Description: Development files for wolfProvider — ${variant:desc} | ||
| This package contains the headers and development files | ||
| for applications using wolfProvider. | ||
|
|
||
| Package: openssl | ||
| Architecture: any | ||
| Section: utils | ||
| Multi-Arch: foreign | ||
| Depends: ${shlibs:Depends}, ${misc:Depends}, libdefault0 | libdefault-wolf0 | ||
| Description: Secure Sockets Layer toolkit - command line interface | ||
| This package contains the OpenSSL command line utility. | ||
| Built for use with wolfProvider. | ||
|
|
||
| Package: libssl3 | ||
| Architecture: any | ||
| Multi-Arch: same | ||
| Depends: ${shlibs:Depends}, ${misc:Depends}, libdefault0 | libdefault-wolf0 | ||
| Breaks: libssl3 (<< 3.0.0) | ||
| Replaces: libssl3 | ||
| Recommends: openssl | ||
| Description: OpenSSL shared libraries (wolfProvider build) | ||
| This package contains the OpenSSL shared libraries built | ||
| for use with wolfProvider. | ||
|
|
||
| Package: libssl-dev | ||
| Architecture: any | ||
| Section: libdevel | ||
| Multi-Arch: same | ||
| Depends: libssl3 (= ${binary:Version}), ${misc:Depends} | ||
| Breaks: libssl-dev (<< 3.0.0) | ||
| Replaces: libssl-dev | ||
| Description: OpenSSL development files (wolfProvider build) | ||
| This package contains headers, pkg-config files and linker symlinks | ||
| for the OpenSSL version built for wolfProvider. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.