Add support for i686-linux
This commit is contained in:
parent
dce01bd31b
commit
023dffe70c
@ -9,12 +9,14 @@
|
|||||||
|
|
||||||
outputs = { self, nixpkgs, utils, naersk, rust-overlay }:
|
outputs = { self, nixpkgs, utils, naersk, rust-overlay }:
|
||||||
let
|
let
|
||||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
|
|
||||||
buildTargetsBySystem = {
|
buildTargetsBySystem = {
|
||||||
"x86_64-linux" = "x86_64-unknown-linux-musl";
|
"x86_64-linux" = "x86_64-unknown-linux-musl";
|
||||||
|
"i686-linux" = "i686-unknown-linux-musl";
|
||||||
"aarch64-linux" = "aarch64-unknown-linux-musl";
|
"aarch64-linux" = "aarch64-unknown-linux-musl";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
supportedSystems = builtins.attrNames buildTargetsBySystem;
|
||||||
|
|
||||||
eachCrossSystem = callback: (builtins.foldl'
|
eachCrossSystem = callback: (builtins.foldl'
|
||||||
(overall: buildSystem: overall // {
|
(overall: buildSystem: overall // {
|
||||||
${buildSystem} = (builtins.foldl'
|
${buildSystem} = (builtins.foldl'
|
||||||
|
@ -3,5 +3,6 @@ channel = "nightly-2023-07-23"
|
|||||||
components = [ "rustfmt", "rustc-dev", "clippy", "cargo" ]
|
components = [ "rustfmt", "rustc-dev", "clippy", "cargo" ]
|
||||||
targets = [
|
targets = [
|
||||||
"x86_64-unknown-linux-musl",
|
"x86_64-unknown-linux-musl",
|
||||||
|
"i686-unknown-linux-musl",
|
||||||
"aarch64-unknown-linux-musl"
|
"aarch64-unknown-linux-musl"
|
||||||
]
|
]
|
||||||
|
@ -42,7 +42,7 @@ impl Certificate {
|
|||||||
.or_unexpected_while("setting not_before")?;
|
.or_unexpected_while("setting not_before")?;
|
||||||
|
|
||||||
// 9999/07/23
|
// 9999/07/23
|
||||||
let not_after = Asn1Time::from_unix(253388296800).expect("initializing not_after");
|
let not_after = Asn1Time::from_str("99990723000000Z").expect("initializing not_after");
|
||||||
builder
|
builder
|
||||||
.set_not_after(not_after.as_ref())
|
.set_not_after(not_after.as_ref())
|
||||||
.or_unexpected_while("setting not_after")?;
|
.or_unexpected_while("setting not_after")?;
|
||||||
@ -157,3 +157,19 @@ impl std::iter::IntoIterator for CertificateChain {
|
|||||||
self.0.into_iter()
|
self.0.into_iter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
use crate::domain;
|
||||||
|
use crate::domain::tls::PrivateKey;
|
||||||
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn make_cert() {
|
||||||
|
let pkey = PrivateKey::new();
|
||||||
|
let domain = domain::Name::from_str("foo.com").expect("domain name parsed");
|
||||||
|
let cert = Certificate::new_self_signed(&pkey, &domain).expect("cert created");
|
||||||
|
println!("{}", cert);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user