-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Required for SSSD.
- Loading branch information
Gaël Donval
committed
Nov 26, 2024
1 parent
960d03d
commit 8075892
Showing
1 changed file
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,102 @@ | ||
package: | ||
name: libjose | ||
version: 14 | ||
epoch: 0 | ||
description: "C-language implementation of Javascript Object Signing and Encryption " | ||
url: https://github.com/latchset/jose | ||
copyright: | ||
- license: Apache-2.0 | ||
dependencies: | ||
runtime: | ||
- openssl | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- busybox | ||
- build-base | ||
- bash | ||
- coreutils | ||
- gcc | ||
- openssl-dev | ||
- glibc-dev | ||
- zlib-dev | ||
- jansson-dev | ||
|
||
pipeline: | ||
- uses: fetch | ||
with: | ||
uri: https://github.com/latchset/jose/releases/download/v${{package.version}}/jose-${{package.version}}.tar.xz | ||
expected-sha256: cee329ef9fce97c4c025604a8d237092f619aaa9f6d35fdf9d8c9052bc1ff95b | ||
|
||
- uses: meson/configure | ||
- uses: meson/compile | ||
- name: Tests | ||
needs: | ||
packages: | ||
- meson | ||
runs: meson test -C output | ||
- uses: meson/install | ||
- uses: strip | ||
|
||
subpackages: | ||
- name: jose | ||
dependencies: | ||
runtime: | ||
- libjose | ||
pipeline: | ||
- runs: | | ||
mkdir -p "${{targets.subpkgdir}}"/usr | ||
mv "${{targets.destdir}}"/usr/bin "${{targets.subpkgdir}}"/usr/ | ||
test: | ||
environment: | ||
contents: | ||
packages: | ||
- busybox | ||
pipeline: | ||
- name: Test key management (AES128-GCM, RSA, ES256) | ||
runs: | | ||
# Test key generation | ||
jose jwk gen -i '{"alg": "A128GCM"}' -o oct.jwk | ||
jose jwk gen -i '{"alg": "RSA1_5"}' -o rsa.jwk | ||
jose jwk gen -i '{"alg": "ES256"}' -o ec.jwk | ||
# Test pubkey calculation | ||
jose jwk pub -i oct.jwk -o oct.pub.jwk | ||
jose jwk pub -i rsa.jwk -o rsa.pub.jwk | ||
jose jwk pub -i ec.jwk -o ec.pub.jwk | ||
# Test thumbprint calculation | ||
jose jwk thp -i oct.jwk > /dev/null | ||
jose jwk thp -i rsa.jwk > /dev/null | ||
jose jwk thp -i ec.jwk > /dev/null | ||
- name: Test signature | ||
runs: | | ||
echo "message" | jose jws sig -i- -k ec.jwk -o msg.jws | ||
jose jws ver -i msg.jws -k ec.pub.jwk | ||
- name: Test encryption | ||
runs: | | ||
echo "message" | jose jwe enc -I - -k rsa.pub.jwk -o encrypted.jwe | ||
jose jwe dec -i encrypted.jwe -k rsa.jwk | ||
- name: libjose-dev | ||
pipeline: | ||
- uses: split/dev | ||
test: | ||
pipeline: | ||
- uses: test/pkgconf | ||
dependencies: | ||
runtime: | ||
- libjose | ||
|
||
- name: libjose-doc | ||
pipeline: | ||
- uses: split/manpages | ||
|
||
update: | ||
enabled: true | ||
github: | ||
identifier: latchset/jose | ||
strip-prefix: v |