Skip to content

Commit

Permalink
upgpkg: oqsprovider-git r130.57d4c58-1
Browse files Browse the repository at this point in the history
* Install only oqsprovider.so after open-quantum-safe/oqs-provider#207
* Enable additional algorithsm (see open-quantum-safe/oqs-provider#210)
  • Loading branch information
iyanmv committed Jul 22, 2023
1 parent f61c027 commit 57326df
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 13 deletions.
12 changes: 10 additions & 2 deletions oqsprovider-git/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
pkgbase = oqsprovider-git
pkgdesc = OpenSSL 3 provider containing post-quantum algorithms
pkgver = r108.0c91d09
pkgver = r130.57d4c58
pkgrel = 1
url = https://openquantumsafe.org/applications/tls.html#oqs-openssl-provider
arch = x86_64
license = MIT
makedepends = cmake
makedepends = git
depends = liboqs>0.7.2
makedepends = python
makedepends = python-jinja
makedepends = python-tabulate
makedepends = python-yaml
depends = liboqs>=0.8.0
depends = openssl
provides = oqsprovider
conflicts = oqsprovider
source = oqsprovider-git::git+https://github.com/open-quantum-safe/oqs-provider
source = liboqs-0.8.0.tar.gz::https://github.com/open-quantum-safe/liboqs/archive/refs/tags/0.8.0.tar.gz
source = enable-algs.patch
b2sums = SKIP
b2sums = f84a290ece4fffe458988e2ddbbcb4efb05f0d2be97ab21d4ccd60720977477d9b36cd2a9c69bad7815c5ed69eaf3526ee8fc65d819c0b3c341d326bd435bc16
b2sums = 71286fda50b1830ee70e3cc23b647499f812348c3303c518147f2ec62c300bca346147e6bdf540748a5ca6400c6134607ffd47f6166b3b6661c53aabb8035af2

pkgname = oqsprovider-git
40 changes: 29 additions & 11 deletions oqsprovider-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,30 +1,53 @@
# Maintainer: Iyán Méndez Veiga <me (at) iyanmv (dot) com>
pkgname=oqsprovider-git
_pkgname=oqs-provider
pkgver=r108.0c91d09
pkgver=r130.57d4c58
_pkgverliboqs=0.8.0
pkgrel=1
pkgdesc="OpenSSL 3 provider containing post-quantum algorithms"
arch=('x86_64')
url="https://openquantumsafe.org/applications/tls.html#oqs-openssl-provider"
license=('MIT')
depends=(
'liboqs>0.7.2'
'liboqs>=0.8.0'
'openssl'
)
makedepends=(
'cmake'
'git'
'python'
'python-jinja'
'python-tabulate'
'python-yaml'
)
provides=('oqsprovider')
conflicts=('oqsprovider')
source=("${pkgname}::git+https://github.com/open-quantum-safe/${_pkgname}")
b2sums=('SKIP')
source=(
"${pkgname}::git+https://github.com/open-quantum-safe/${_pkgname}"
"liboqs-${_pkgverliboqs}.tar.gz::https://github.com/open-quantum-safe/liboqs/archive/refs/tags/${_pkgverliboqs}.tar.gz"
"enable-algs.patch"
)
b2sums=(
'SKIP'
'f84a290ece4fffe458988e2ddbbcb4efb05f0d2be97ab21d4ccd60720977477d9b36cd2a9c69bad7815c5ed69eaf3526ee8fc65d819c0b3c341d326bd435bc16'
'71286fda50b1830ee70e3cc23b647499f812348c3303c518147f2ec62c300bca346147e6bdf540748a5ca6400c6134607ffd47f6166b3b6661c53aabb8035af2'
)

pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare() {
# Enable additional algorithms supported by liboqs
# See: https://github.com/open-quantum-safe/oqs-provider/issues/210
patch --directory="${pkgname}" --forward --strip=1 --input="${srcdir}/enable-algs.patch"

# Some files are needed from the liboqs source code or generate.py will fail
cd "${pkgname}"
LIBOQS_SRC_DIR="${srcdir}/liboqs-${_pkgverliboqs}" python oqs-template/generate.py
}

build() {
cmake -B build -S "${pkgname}" \
-DCMAKE_BUILD_TYPE='None' \
Expand All @@ -34,11 +57,6 @@ build() {
}

package() {
cd "${srcdir}"/build/lib/

for library in *; do
install -D -m0755 "${library}" "${pkgdir}"/usr/lib/ossl-modules/${library}
done

install -D -m0644 "${srcdir}"/${pkgname}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
install -D -m0755 build/lib/oqsprovider.so "${pkgdir}"/usr/lib/ossl-modules/oqsprovider.so
install -D -m0644 ${pkgname}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
76 changes: 76 additions & 0 deletions oqsprovider-git/enable-algs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml
index 0f6939b..363b000 100644
--- a/oqs-template/generate.yml
+++ b/oqs-template/generate.yml
@@ -872,7 +872,7 @@ sigs:
oid: '1.3.9999.6.5.12'
code_point: '0xfebb'
supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk']
- enable: false
+ enable: true
mix_with: [{'name': 'p384',
'pretty_name': 'ECDSA p384',
'oid': '1.3.9999.6.5.13',
@@ -910,7 +910,7 @@ sigs:
oid: '1.3.9999.6.6.10'
code_point: '0xfebd'
supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk']
- enable: false
+ enable: true
mix_with: [{'name': 'p521',
'pretty_name': 'ECDSA p521',
'oid': '1.3.9999.6.6.11',
@@ -948,7 +948,7 @@ sigs:
oid: '1.3.9999.6.6.12'
code_point: '0xfec0'
supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk']
- enable: false
+ enable: true
mix_with: [{'name': 'p521',
'pretty_name': 'ECDSA p521',
'oid': '1.3.9999.6.6.13',
@@ -1043,7 +1043,7 @@ sigs:
oid: '1.3.9999.6.7.16'
code_point: '0xfec5'
supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk']
- enable: false
+ enable: true
mix_with: [{'name': 'p256',
'pretty_name': 'ECDSA p256',
'oid': '1.3.9999.6.7.17',
@@ -1089,7 +1089,7 @@ sigs:
oid: '1.3.9999.6.8.10'
code_point: '0xfec8'
supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk']
- enable: false
+ enable: true
mix_with: [{'name': 'p384',
'pretty_name': 'ECDSA p384',
'oid': '1.3.9999.6.8.11',
@@ -1127,7 +1127,7 @@ sigs:
oid: '1.3.9999.6.8.12'
code_point: '0xfeca'
supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk']
- enable: false
+ enable: true
mix_with: [{'name': 'p384',
'pretty_name': 'ECDSA p384',
'oid': '1.3.9999.6.8.13',
@@ -1165,7 +1165,7 @@ sigs:
oid: '1.3.9999.6.9.10'
code_point: '0xfecc'
supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk']
- enable: false
+ enable: true
mix_with: [{'name': 'p521',
'pretty_name': 'ECDSA p521',
'oid': '1.3.9999.6.9.11',
@@ -1203,7 +1203,7 @@ sigs:
oid: '1.3.9999.6.9.12'
code_point: '0xfece'
supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk']
- enable: false
+ enable: true
mix_with: [{'name': 'p521',
'pretty_name': 'ECDSA p521',
'oid': '1.3.9999.6.9.13',

0 comments on commit 57326df

Please sign in to comment.