mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
show not_valid_before date
This commit is contained in:
parent
873ac0b167
commit
b48eb0a3c2
1 changed files with 9 additions and 2 deletions
|
|
@ -10,6 +10,8 @@ use gtk::{
|
||||||
};
|
};
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
|
const DATE_FORMAT: &str = "%Y.%m.%d";
|
||||||
|
|
||||||
pub struct Gemini {
|
pub struct Gemini {
|
||||||
// profile: Rc<Profile>,
|
// profile: Rc<Profile>,
|
||||||
widget: Rc<Widget>,
|
widget: Rc<Widget>,
|
||||||
|
|
@ -68,11 +70,16 @@ impl Gemini {
|
||||||
Value::ProfileIdentityGeminiId(identity.id),
|
Value::ProfileIdentityGeminiId(identity.id),
|
||||||
&certificate.subject_name().unwrap().replace("CN=", ""), // trim prefix
|
&certificate.subject_name().unwrap().replace("CN=", ""), // trim prefix
|
||||||
&format!(
|
&format!(
|
||||||
"valid until {} | auth: {}",
|
"{} - {} | auth: {}",
|
||||||
|
certificate
|
||||||
|
.not_valid_before()
|
||||||
|
.unwrap()
|
||||||
|
.format(DATE_FORMAT)
|
||||||
|
.unwrap(),
|
||||||
certificate
|
certificate
|
||||||
.not_valid_after()
|
.not_valid_after()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.format("%Y-%m-%d")
|
.format(DATE_FORMAT)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
profile
|
profile
|
||||||
.identity
|
.identity
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue