Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find key.pem file #18

Closed
natewoodbridge opened this issue Oct 12, 2018 · 4 comments
Closed

Cannot find key.pem file #18

natewoodbridge opened this issue Oct 12, 2018 · 4 comments

Comments

@natewoodbridge
Copy link

natewoodbridge commented Oct 12, 2018

When I try and run the binary downloaded from the release tab I get an error saying cannot find src/key.pm

This is the full error:
thread 'main' panicked at 'called Result::unwrap()on anErrvalue: ErrorStack([Error { code: 33558530, library: "system library", function: "fopen", reason: "No such file or directory", file: "bss_file.c", line: 406, data: "fopen(\'src/key.pem\',\'r\')" }, Error { code: 537346050, library: "BIO routines", function: "FILE_CTRL", reason: "system lib", file: "bss_file.c", line: 408 }, Error { code: 336265218, library: "SSL routines", function: "SSL_CTX_use_PrivateKey_file", reason: "system lib", file: "ssl_rsa.c", line: 633 }])', libcore/result.rs:945:5

@shakyShane
Copy link
Contributor

@natewoodbridge thanks - looks like I need to include the self-signed key/cert into the binary

config-gen/src/main.rs

Lines 106 to 118 in 9f43b9f

///
/// SSL builder
///
/// Todo: allow key/cert options
///
fn get_ssl_builder() -> SslAcceptorBuilder {
let mut builder = SslAcceptor::mozilla_intermediate(SslMethod::tls()).unwrap();
builder
.set_private_key_file("src/key.pem", SslFiletype::PEM)
.unwrap();
builder.set_certificate_chain_file("src/cert.pem").unwrap();
builder
}

@shakyShane
Copy link
Contributor

@natewoodbridge for now, you can always clone this repo and run

cargo run -- https://example.com --config config.yml

@shakyShane
Copy link
Contributor

@natewoodbridge got a fix in works

@natewoodbridge
Copy link
Author

@shakyShane Works now. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants