{"action":"created","issue":{"url":"https://api.github.com/repos/guanzhi/GmSSL/issues/505","repository_url":"https://api.github.com/repos/guanzhi/GmSSL","labels_url":"https://api.github.com/repos/guanzhi/GmSSL/issues/505/labels{/name}","comments_url":"https://api.github.com/repos/guanzhi/GmSSL/issues/505/comments","events_url":"https://api.github.com/repos/guanzhi/GmSSL/issues/505/events","html_url":"https://github.com/guanzhi/GmSSL/issues/505","id":328947034,"node_id":"MDU6SXNzdWUzMjg5NDcwMzQ=","number":505,"title":"网络抓包，验证签名失败，求解？","user":{"login":"Jason0401","id":23185084,"node_id":"MDQ6VXNlcjIzMTg1MDg0","avatar_url":"https://avatars1.githubusercontent.com/u/23185084?v=4","gravatar_id":"","url":"https://api.github.com/users/Jason0401","html_url":"https://github.com/Jason0401","followers_url":"https://api.github.com/users/Jason0401/followers","following_url":"https://api.github.com/users/Jason0401/following{/other_user}","gists_url":"https://api.github.com/users/Jason0401/gists{/gist_id}","starred_url":"https://api.github.com/users/Jason0401/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jason0401/subscriptions","organizations_url":"https://api.github.com/users/Jason0401/orgs","repos_url":"https://api.github.com/users/Jason0401/repos","events_url":"https://api.github.com/users/Jason0401/events{/privacy}","received_events_url":"https://api.github.com/users/Jason0401/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-04T07:59:02Z","updated_at":"2018-06-12T02:55:44Z","closed_at":"2018-06-08T01:33:30Z","author_association":"NONE","body":"加密套件用的是ECDHE-SM2-WITH-SMS4-SM3（0xE102），签名算法用的是0x0707\r\n\r\n1. \r\n-----BEGIN CERTIFICATE-----\r\nMIIB1DCCAXqgAwIBAgIJAJ18vCvqycz4MAoGCCqGSM49BAMCMEUxCzAJBgNVBAYT\r\nAkNOMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRn\r\naXRzIFB0eSBMdGQwHhcNMTgwNTE0MTkwMjUwWhcNMTgwNjEzMTkwMjUwWjBFMQsw\r\nCQYDVQQGEwJDTjETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJu\r\nZXQgV2lkZ2l0cyBQdHkgTHRkMFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEAZc6\r\nemmWX1b50rqB8+uIZzTLjw6mfJMZLecCml7KhY4YynNPBdyQY1oT8cHiJuUPNfV7\r\nTzhEFl2QNRXtlNNW5aNTMFEwHQYDVR0OBBYEFNUHkuwbsBSxwNjzF/C1/Al7gZZs\r\nMB8GA1UdIwQYMBaAFNUHkuwbsBSxwNjzF/C1/Al7gZZsMA8GA1UdEwEB/wQFMAMB\r\nAf8wCgYIKoZIzj0EAwIDSAAwRQIgWacgWuVeqfcnd0vxypnrDVkwSTHzw+SWdWZj\r\nmyMvZWQCIQDF8a91jahrRqTDtJ9KkGmRwTRCGD/PGqN+eguWWplGVw==\r\n-----END CERTIFICATE-----\r\n2. ClientHello客户端随机数\r\n0xaf19135787537118c1821eda4c62bad7c58398ba3111b96c5a90056af8225aa2\r\n3. ServerHello服务端随机数\r\n0xc20e6c9e03e4f9b0db25bbe6a1d46e8543ee35dee2253b57d6fed06beda86ff5\r\n4. ServerkeyExchange服务端ECDH参数0x03001e410492f52a5d8bf9d7dfa8d0b752821940f2b5516bc0ca0b36817b32fa4618d1af7f23460d00bd098d3311627005e35d8e07cd1501ea1ffd518883c5c9af8a912717\r\n5. ServerKeyExchange服务端签名（不包括签名的长度，长度是0x48）\r\n0x3046022100e6b61ef52f86997943d8c1115e3bbd6b9b2e14a52b51e8f768cbe311be0d6b65022100887f6ed7457aad33d7838e6f5695b3d04513d3d21f93144959e53dff519cd594\r\n\r\n我有看gmssl的源码，不确定是不是用的static int gmtls_construct_ske_sm2(SSL *s, unsigned char **p, int *l, int *al)这个函数？我自己还原了好几次摘要都验证签名失败了....T_T\r\n\r\n求大神帮我还原一下进行sm2签名前的摘要！！！\r\n网络上抓取的签名，我将其从HEX一一转为ASCII码形式，是否可以用于gmssl verify命令的验签？"},"comment":{"url":"https://api.github.com/repos/guanzhi/GmSSL/issues/comments/396449748","html_url":"https://github.com/guanzhi/GmSSL/issues/505#issuecomment-396449748","issue_url":"https://api.github.com/repos/guanzhi/GmSSL/issues/505","id":396449748,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjQ0OTc0OA==","user":{"login":"iF2007","id":4461848,"node_id":"MDQ6VXNlcjQ0NjE4NDg=","avatar_url":"https://avatars3.githubusercontent.com/u/4461848?v=4","gravatar_id":"","url":"https://api.github.com/users/iF2007","html_url":"https://github.com/iF2007","followers_url":"https://api.github.com/users/iF2007/followers","following_url":"https://api.github.com/users/iF2007/following{/other_user}","gists_url":"https://api.github.com/users/iF2007/gists{/gist_id}","starred_url":"https://api.github.com/users/iF2007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iF2007/subscriptions","organizations_url":"https://api.github.com/users/iF2007/orgs","repos_url":"https://api.github.com/users/iF2007/repos","events_url":"https://api.github.com/users/iF2007/events{/privacy}","received_events_url":"https://api.github.com/users/iF2007/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T02:55:44Z","updated_at":"2018-06-12T02:55:44Z","author_association":"NONE","body":"@Jason0401 gmtls_process_ske_sm2函数中也是先算SM3(Z)，然后加上两个随机数和加密证书后进行SM3进行验证的。但是对测试网站的签名无法验证。\r\n\r\n你用的哪个测试网站？"}}
{"actor":{"display_login":"iF2007"}}