I didn’t find a way to do this command on openssl using erlang public_key, someone ha any similar issue?
all data I receive is a data, and validation-data, inside the validation data it is a der encoded, it contains the signature and the certificates, the root CA I have.
This is all the commands I am using inside the Elixir code
openssl pkcs7 -inform der -in pkc7_data_path -out signature_path
openssl pkcs7 -print_certs -in signature_path -out certfile_path
openssl smime -verify -binary -inform PEM -in signature_path -content content_path -certfile certfile_path -nointern -CAfile root_cert_path
Some reference I was consulting was this
Hello Elixir community,
I’m currently working on an app that delivers Apple Wallet passes to its users. Basically I followed the official guidelines , and implemented most of the stuff directly in Elixir. However to correctly sign the passes, Apple states the following:
To create the signature file, make a PKCS #7 detached signature of the manifest file, using the private key associated with your signing certificate. Include the WWDR intermediate certificate as part of the signature. You can d…
Hello,
I have a PEM certificate issued for my CSR: my-cert.crt, my private key: private key
I can create a PKCS7 file with that command
openssl smime -sign \
-nodetach \
-in test.txt \
-out signed_data \
-outform PEM \
-signer my-cert.crt \
-inkey private key
My question is: how can I create the same in elixir?
I can sign the file in openssl like that:
openssl dgst -sha256 -sign $privatekey -out /tmp/$filename.sha256 $filename
op…
pkcs7_demo.erl
-module(pkcs7_demo).
% reduced example for issue in github.com/erlang/otp
-compile([export_all]).
-include_lib("public_key/include/public_key.hrl").
pkcs7_verify(Message, #'SignedData'{version = Vsn} = SD, Config) ->
Vsn == sdVer1 orelse erlang:error({unsupported_version, Vsn}),
#'SignedData'{
This file has been truncated. show original