Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,4 @@ bitquan-web/
secrets/

_TRASH_PENDING/
ψ
94 changes: 92 additions & 2 deletions Cargo.lock
100755 → 100644

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/rpc/Cargo.toml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ httparse = "1.8"
rustls = { version = "0.23", features = ["ring"] }
tokio = { version = "1", features = ["full"] }
tokio-rustls = { version = "0.26", default-features = false, features = ["logging"] }
rcgen = "0.13"
rcgen = "0.14"

# JWT Authentication
jsonwebtoken = "9.2"
Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/src/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ impl AsRef<ServerConfig> for TlsConfig {
/// The artefacts are written to `cert.pem` and `key.pem` under the provided output directory.
pub fn generate_self_signed_cert(output_dir: &Path) -> Result<(), TlsError> {
let subject_alt_names = vec!["localhost".to_string(), "127.0.0.1".to_string()];
let CertifiedKey { cert, key_pair } = generate_simple_self_signed(subject_alt_names)?;
let CertifiedKey { cert, signing_key } = generate_simple_self_signed(subject_alt_names)?;

let cert_pem = cert.pem();
let key_pem = key_pair.serialize_pem();
let key_pem = signing_key.serialize_pem();

std::fs::write(output_dir.join("cert.pem"), cert_pem)?;
std::fs::write(output_dir.join("key.pem"), key_pem)?;
Expand Down