我想以下面给出的格式生成签名
----- BEGIN PKCS7 ----- MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIAwggNeMIIC RqADAgECAgRUDUiYMA0GCSqGSIb3DQEBCwUAMHExCzAJBgNVBAYTAklMRIwEAYDVQQIEwlraGFq YW5lZWExEjAQBgNVBAcTCWtoYWphbmVlYTESMBAGA1UEChMJa2hhamFtZWVhMRIwEAYDVQQLEwlr aGFqYW5lZWExEjAQBgNVBAMTCWtoYWphbmVlYTAeFw0xNDA5MDgwNjExMzZaFw0xOTA4MTMwNjEx MzZaMHExCzAJBgNVBAYTAklMRIwEAYDVQQIEwlraGFqYW5lZWExEjAQBgNVBAcTCWtoYWphbmVl YTESMBAGA1UEChMJa2hhamFtZWVhMRIwEAYDVQQLEwlraGFqYW5lZWExEjAQBgNVBAMTCWtoYWph bmVlYTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIi2iPMHN + 4sVbW8mAXu8x2QDtss ZU0Qxt / iefTevSygA2m0JTFl1s6BTIP5IOYBTdMeZHPMt8XtnGetuulzCnkFcpp08mAONW5j74xp Pv9F0KD + GCFHWEgSOBm2VWH7Ri6g3tkYBT4C9Y3VVPQs3RpzVqm3nn9ERoquiVNih / swbwgAODjg EOeJC6C4G + yowluNKIrbvwTD6Oy7xe17s8qeLSI002DqVZKDhiucJreO3 / VnB5nM3jJLA + PHeVEJ iyg0qqbxddXhkAlgyRIDo0kz3c8m0sm8Uh9pqIGHTDL5qwIUfKMA0H9VUoWxqG2u1 / wbMPyKhzjI mKNMvqdTTS8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAEzJeM0juQy6LWjtubkHr / XeFVoCqqDoW dohMp5eQ / 8rNM1Otuog4ZSp8wgqtW3VGPY0uDJ7BW6SKz / 0XIrlCqRYdM / tSeSTRrXl9fSm8Iaeb 6rLINT / jnfeYsOFwhB9kSm6lo5 + GY58 / iYATocsCnkofJlRDGJSZhwgBHH4j33N7HUcalj + 8 / 1Se lWvb7huqhEaKpBUY00mBJMWFOyPhM7gxNjlUjawnQZuUkCxyFQiM6hyb5O3btNO4B29Hp1mqzHq4 gVHsGPuID + lvQml7f171BJEDWjTDDeIi6sLTHQO9RUz / 2OkhSRTm2nEYf + 4IATiKrO8uqjF1ysxY KeXq3gAAMYIB / zCCAfsCAQEweTBxMQswCQYDVQQGEwJJTjESMBAGA1UECBMJa2hhamFuZWVhMRIw EAYDVQQHEwlraGFqYW5lZWExEjAQBgNVBAoTCWtoYWphbWVlYTESMBAGA1UECxMJa2hhamFuZWVh MRIwEAYDVQQDEwlraGFqYW5lZWECBFQNSJgwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkq hkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE3MDkwNzA3MjQ1NFowIwYJKoZIhvcNAQkEMRYEFJzo 8N5KkBJXKAT8yvxMfhsdDFinMA0GCSqGSIb3DQEBAQUABIIBADz43QoVuAqLwhUxlVvsM3cV9S0T k220X / f55YBYzQYvmdq6lPIRkvrU9OOKQ4Ot4v05VpkbFOlgWuC + ShhqLPCZk + roU + nWYxgqr2kS evWIh6zLi + 00X2L2skslzpufbk6kTNtkfJAs8y1AEi4T6Z13ibseT + TMaXWiO58AX / xESJCf3NFI q54Tlmh3tg1RBbStRkixU06ZW1Cy8ubTpCVyiJK3BV9uuOD96QNbHEYq8qcMqd07PWxOpRfSsdNH mbxwvoajwsE16fswQ8ukZ7EP2R0o5mOAFR2AbmrA809Z5Z + T4v9sjF7QE5lPQriTlBN0k1G3qCNW CRXZRKN3qCQAAAAAAAA = ----- END PKCS7 -----
有关更多详细信息,请参阅我之前的问题
Error reading XMLStreamReader. Getting fault response
还有一个问题。如何安装Open SSL?
答案 0 :(得分:0)
为了在Windows上安装OpenSSL:
注释: 对于链接到证书的加密标准操作,“ Lite”版本已足够。对于某些Windows版本(Windows 2000,Windows XP ...),您还必须安装“ Visual C ++ 2008 Redistributables”。
以便在Windows计算机上使用它:
C:\ OpenSSL-Win32 \ bin \ openssl.exe(或> C:\ OpenSSL-Win64 \ bin \ openssl.exe)
请继续阅读install instruction指南。
为了签名和验证文本/文件,请通过openSSL命令行遵循此link。
要在代码中执行此操作,请使用以下Tutorial。
security.stackexchange中有此post,涉及用于使用openSSL签名XML文件的私钥。