Openssl verify with public_key

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