I need to create a js script to extract files contained in a p7m file (. From shell I can do it easily with the following instruction :
for i in `ls *.pdf.p7m`; do openssl smime -decrypt -verify -inform DER -in $i -noverify -out $i.pdf;done
but i can't do it by creating a script.
The goal is to make sure that when you upload a p7m file in an alfresco folder, the pdf file contained and stored in the same folder is extracted