Digital signature for a file using openssl

前端 未结 3 1819
粉色の甜心
粉色の甜心 2020-12-07 12:46

Is there a way to digitally sign a x509 certificate or any document using openssl?

3条回答
  •  再見小時候
    2020-12-07 13:23

    To digitally sign document in openssl it will work

    For this first your certificate should be trusted it would be look like this

    -----BEGIN TRUSTED CERTIFICATE-----
    MIIDbjCCAlYCCQCOyunl25ProDANBgkqhkiG9w0BAQUFADB5MQswCQYDVQQGEwJJ
    ...
    -----END TRUSTED CERTIFICATE-----
    

    Then use following command

    smime -sign -signer certificate.pem -inkey private.key -in test.txt \
        -out test1.txt -from ashish -to singhal
    

提交回复
热议问题