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

MAC verification always failed for PKCS12 cert #115

Open
qdwang opened this issue Jun 17, 2024 · 0 comments
Open

MAC verification always failed for PKCS12 cert #115

qdwang opened this issue Jun 17, 2024 · 0 comments

Comments

@qdwang
Copy link

qdwang commented Jun 17, 2024

I generated the PKCS12 cert by using these commands:

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=mydev.local"

and

openssl pkcs12 -export -out mydev.local.p12 -inkey key.pem -in cert.pem -name "mydev.local"

with manually input password abcd1234.

But when running simple-http-server, it failed.

simple-http-server --cert mydev.local.p12 --certpass abcd1234

The output is:

thread 'main' panicked at /Users/qdwang/.cargo/registry/src/index.crates.io-6f17d22bba15001f/simple-http-server-0.6.8/src/main.rs:387:70:
called `Result::unwrap()` on an `Err` value: Tls(Error { code: -25264, message: "MAC verification failed during PKCS12 import (wrong password?)" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
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

1 participant