Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit c2f29f6

Browse files
committed
feat: get issuer
1 parent df6ccfb commit c2f29f6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/database/idcert.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use polyproto::{
1010
use sqlx::query;
1111

1212
use crate::{
13-
database::{AlgorithmIdentifier, Database},
13+
database::{AlgorithmIdentifier, Database, Issuer},
1414
errors::{Context, Error},
1515
};
1616

@@ -110,11 +110,16 @@ impl HomeServerCert {
110110
None,
111111
None,
112112
None,
113-
Some("ID-Cert contained cryptographic algorithms not supported by this server"),
113+
Some("ID-Cert contains cryptographic algorithms not supported by this server"),
114114
)),
115115
));
116116
};
117-
cert.id_cert_tbs;
117+
#[allow(clippy::expect_used)]
118+
// This event should never happen and, as far as I am aware, cannot be triggered by any
119+
// user. As such, I see it ok to unwrap here.
120+
let issuer = Issuer::get_own(db).await?.expect(
121+
"The issuer entry for this sonata instance should have been added to the database on startup!",
122+
);
118123
todo!()
119124
}
120125
}

0 commit comments

Comments
 (0)