{"action":"closed","issue":{"url":"https://api.github.com/repos/mirus77/DelphiEET/issues/5","repository_url":"https://api.github.com/repos/mirus77/DelphiEET","labels_url":"https://api.github.com/repos/mirus77/DelphiEET/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/mirus77/DelphiEET/issues/5/comments","events_url":"https://api.github.com/repos/mirus77/DelphiEET/issues/5/events","html_url":"https://github.com/mirus77/DelphiEET/issues/5","id":191580329,"number":5,"title":"libeetsigner and problem with peetSignerMakeBKP and peetSignerMakePKP and 0 in hash","user":{"login":"delphicz","id":16529955,"avatar_url":"https://avatars.githubusercontent.com/u/16529955?v=3","gravatar_id":"","url":"https://api.github.com/users/delphicz","html_url":"https://github.com/delphicz","followers_url":"https://api.github.com/users/delphicz/followers","following_url":"https://api.github.com/users/delphicz/following{/other_user}","gists_url":"https://api.github.com/users/delphicz/gists{/gist_id}","starred_url":"https://api.github.com/users/delphicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delphicz/subscriptions","organizations_url":"https://api.github.com/users/delphicz/orgs","repos_url":"https://api.github.com/users/delphicz/repos","events_url":"https://api.github.com/users/delphicz/events{/privacy}","received_events_url":"https://api.github.com/users/delphicz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-24T19:09:30Z","updated_at":"2016-11-24T22:19:51Z","closed_at":"2016-11-24T22:19:51Z","body":"Hi, \r\n\r\n[fail.txt](https://github.com/mirus77/DelphiEET/files/612049/fail.txt)\r\n\r\nwhen used USE_LIBEET\r\npeetSignerMakeBKP return \r\n75E6FBE5-05852E38-F27D235C-844068E9-9F54\r\nbut original dlls return\r\n75E6FBE5-05852E38-F27D235C-844068E9-9F5400AB\r\n\r\nI think, that there is a problem with 0 check in string in dll.\r\nWhen hash contains 0, returning buffer is truncated.\r\nDemo fail.xml is in attachent.\r\nTest case\r\n`\r\nprocedure TTestEETForm.Button1Click(Sender: TObject);\r\nvar\r\n  ms: TMemoryStream;\r\n\r\n\r\n  eTrzba : Trzba;\r\n  EET : TEETTrzba;\r\nbegin\r\n  ms := TMemoryStream.Create;\r\n    EET := TEETTrzba.Create(nil);\r\n    EET.URL := 'https://pg.eet.cz:443/eet/services/EETServiceSOAP/v3';\r\n\r\n\r\n    eTrzba := Trzba.Create;\r\n    EET.RootCertFile := 'q:\\crmxev5\\delphieet\\demo\\bin\\eet\\Geotrust_PCA_G3_Root.pem';\r\n    EET.PFXStream.LoadFromFile('q:\\crmxev5\\delphieet\\demo\\bin\\eet\\EET_CA1_Playground-CZ00000019.p12');\r\n    EET.AddTrustedCertFromFileName('q:\\crmxev5\\delphieet\\demo\\bin\\eet\\trusted_CA_pg.der');\r\n    EET.AddTrustedCertFromFileName('q:\\crmxev5\\delphieet\\demo\\bin\\eet\\trusted_CA_prod.der');\r\n    EET.AddTrustedCertFromFileName('q:\\crmxev5\\delphieet\\demo\\bin\\eet\\trusted_CA_prod_ROOT.der');\r\n    EET.PFXPassword := 'eet';\r\n    EET.ConnectTimeout := 2000;\r\n    EET.Initialize;\r\n    ms.LoadFromFile('q:\\crmxev5\\delphieet\\demo\\fail.xml');\r\n    ms.Position := 0;\r\n    EET.LoadFromXML(eTrzba, ms);\r\n\r\n    EET.SignTrzba(eTrzba);\r\n    ShowMessage(eTrzba.KontrolniKody.bkp.Text);\r\nend;\r\n`\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"mirus77"}}