sign file with bouncy castle in java
问题 I want to sign a file content with certificate in java. With terminal and openssl, I can do this : openssl smime -sign -in nosign.mobileconfig -out signed.mobileconfig -signer server.crt -inkey server.key -certfile cacert.crt -outform der -nodetach server.crt and .key are the files to sign, and I think I understand the cacert.crt is embedded inside the out content. finally, I have a file signed and trusted. In Java, I can't use openssl (don't want to launch openssl command) so, I have to sign