Skip to content

Commit 8ac817b

Browse files
authored
Add a X.509 certificate example (#998)
Adds an example in rust for generating X.509 certificates using threshold Ed25519 and threshold ECDSA with curve secp256k1. The example canister generates a root CA certificate. The example canister generates child certificates for user-provided certificate signing requests. Closes CRP-2583.
1 parent 2d738da commit 8ac817b

File tree

21 files changed

+4313
-156
lines changed

21 files changed

+4313
-156
lines changed

.github/workflows/provision-pocket-ic-server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -ex
44

5-
POCKET_IC_SERVER_VERSION=${POCKET_IC_SERVER_VERSION:=5.0.0}
5+
POCKET_IC_SERVER_VERSION=${POCKET_IC_SERVER_VERSION:=6.0.0}
66
POCKET_IC_SERVER_PATH=${POCKET_IC_SERVER_PATH:="${HOME}/bin/pocket-ic-server"}
77

88
if [[ $OSTYPE == "linux-gnu"* ]] || [[ $RUNNER_OS == "Linux" ]]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Known failure: https://dfinity.atlassian.net/browse/EM-7
2+
name: rust-x509
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
paths:
9+
- rust/x509/**
10+
- .github/workflows/provision-darwin.sh
11+
- .github/workflows/provision-linux.sh
12+
- .github/workflows/provision-pocket-ic-server.sh
13+
- .github/workflows/rust-x509-example.yml
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
jobs:
18+
rust-x509-darwin:
19+
runs-on: macos-12
20+
steps:
21+
- uses: actions/checkout@v1
22+
- name: Provision Darwin
23+
run: bash .github/workflows/provision-darwin.sh
24+
- name: Provision PocketIC
25+
run: bash .github/workflows/provision-pocket-ic-server.sh
26+
- name: Rust X.509 Darwin
27+
run: |
28+
brew install openssl
29+
pushd rust/x509
30+
dfx build --check
31+
cargo test
32+
rust-x509-linux:
33+
runs-on: ubuntu-20.04
34+
steps:
35+
- uses: actions/checkout@v1
36+
- name: Provision Linux
37+
run: bash .github/workflows/provision-linux.sh
38+
- name: Provision PocketIC
39+
run: bash .github/workflows/provision-pocket-ic-server.sh
40+
- name: Rust X.509 Linux
41+
run: |
42+
sudo apt-get install --yes openssl
43+
pushd rust/x509
44+
dfx build --check
45+
cargo test

motoko/parallel_calls/multi_subnet/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
pocket-ic = "4.0.0"
9+
pocket-ic = "5.0.0"
1010
candid = "0.10"

rust/guards/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ serde = "1.0"
1414

1515
[dev-dependencies]
1616
assert_matches = "1.5.0"
17-
pocket-ic = "4.0.0"
17+
pocket-ic = "5.0.0"

rust/parallel_calls/src/multi_subnet/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
pocket-ic = "4.0.0"
9+
pocket-ic = "5.0.0"
1010
candid = "0.10"

0 commit comments

Comments
 (0)