gematik / ref-eRp-FD-Server

ARCHIVED - This project acts as reference implementation of main aspects of an e-prescription server designed by gematik.
Other
44 stars 3 forks source link

Tool pkcs7-sign not working with server/examples/kbv_bundle.xml #6

Closed pandalec closed 3 years ago

pandalec commented 4 years ago

Hi!

If I use the tool with pkcs7-sign I get an error:

cargo run -p tool -- pkcs7-sign --key qes_id --cert qes.crt --input server/examples/kbv_bundle.xml
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/tool pkcs7-sign --key qes_id --cert qes.crt --input server/examples/kbv_bundle.xml`
thread 'main' panicked at 'Unable to read certificate: Os { code: 2, kind: NotFound, message: "No such file or directory" }', tool/src/pkcs7_sign.rs:66:32
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Absolute paths are not working either. Certificates are generated like described in documentation.

Any ideas what I am doing wrong?

Best regards, parsi

cargo run -p tool -- pkcs7-sign --key qes_id --cert qes.crt --input server/examples/kbv_bundle.xml
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/tool pkcs7-sign --key qes_id --cert qes.crt --input server/examples/kbv_bundle.xml`
thread 'main' panicked at 'Unable to read certificate: Os { code: 2, kind: NotFound, message: "No such file or directory" }', tool/src/pkcs7_sign.rs:66:32
stack backtrace:
   0: rust_begin_unwind
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
   1: core::panicking::panic_fmt
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:85
   2: core::option::expect_none_failed
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/option.rs:1221
   3: core::result::Result<T,E>::expect
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/result.rs:933
   4: tool::pkcs7_sign::execute
             at ./tool/src/pkcs7_sign.rs:66
   5: tool::main
             at ./tool/src/main.rs:44
   6: core::ops::function::FnOnce::call_once
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/ops/function.rs:227
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Gematik-Entwicklung commented 4 years ago

Hi @parsifallo,

the readme has a typo here. If you have generated the certificates as described, the parameters of the tool should be --cert qes.cert.

Best regards, gematik Dev-Team

pandalec commented 4 years ago

Hi Dev Team! Thank you for your quick response. Sorry, I should've seen that :-) BR, parsi