mirror of https://github.com/breard-r/acmed.git
Rodolphe Breard
5 years ago
13 changed files with 55 additions and 74 deletions
-
6CHANGELOG.md
-
4CONTRIBUTING.md
-
1acme_common/Cargo.toml
-
59acme_common/src/crypto/openssl_keys.rs
-
1acmed/Cargo.toml
-
4acmed/src/acme_proto/structs/authorization.rs
-
4acmed/src/certificate.rs
-
2acmed/src/hooks.rs
-
6acmed/src/jws.rs
-
7acmed/src/jws/algorithms.rs
-
31acmed/src/jws/jwk.rs
-
3acmed/src/storage.rs
-
1tacd/Cargo.toml
@ -1,31 +0,0 @@ |
|||||
use serde::Serialize;
|
|
||||
|
|
||||
#[derive(Serialize)]
|
|
||||
#[serde(untagged)]
|
|
||||
pub enum Jwk {
|
|
||||
Es256(Es256Jwk),
|
|
||||
}
|
|
||||
|
|
||||
#[derive(Serialize)]
|
|
||||
pub struct Es256Jwk {
|
|
||||
kty: String,
|
|
||||
#[serde(rename = "use")]
|
|
||||
jwk_use: String,
|
|
||||
crv: String,
|
|
||||
alg: String,
|
|
||||
x: String,
|
|
||||
y: String,
|
|
||||
}
|
|
||||
|
|
||||
impl Es256Jwk {
|
|
||||
pub fn new(x: &str, y: &str) -> Self {
|
|
||||
Es256Jwk {
|
|
||||
kty: "EC".into(),
|
|
||||
jwk_use: "sig".into(),
|
|
||||
crv: "P-256".into(),
|
|
||||
alg: "ES256".into(),
|
|
||||
x: x.to_string(),
|
|
||||
y: y.to_string(),
|
|
||||
}
|
|
||||
}
|
|
||||
}
|
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue