https://bugs.winehq.org/show_bug.cgi?id=56503
Bug ID: 56503 Summary: CryptStringToBinary doesn't adds CR before pad bytes in some cases Product: Wine Version: 9.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: crypt32 Assignee: wine-bugs@winehq.org Reporter: dm.klionsky@gmail.com Distribution: ---
Created attachment 76262 --> https://bugs.winehq.org/attachment.cgi?id=76262 Test program
Both CryptStringToBinaryA and CryptStringToBinaryW don't add CR before pad bytes in some cases.
Attached the test program.
``` $ x86_64-w64-mingw32-gcc certcat.c -lcrypt32 -o certcat ```
``` $ wine certcat.exe << EOF
-----BEGIN CERTIFICATE-----
MIICbTCCAhqgAwIBAgIUM7hPfBQsHsiH5ZqG0PbFdVoW4ZwwCgYIKoUDBwEBAwIw gYwxCzAJBgNVBAYTAlJVMSgwJgYDVQQKDB/QmtC+0LQg0JHQtdC30L7Qv9Cw0YHQ vdC+0YHRgtC4MRcwFQYDVQQLDA7Qo9GH0LXQsdC90YvQuTEtMCsGA1UEAwwk0KPQ piDQmtC+0LQg0JHQtdC30L7Qv9Cw0YHQvdC+0YHRgtC4MQswCQYDVQRIDAJjYTAe Fw0yNDAzMTQwODA0MjFaFw0yNTAzMTQwODA0MjFaMGkxCzAJBgNVBAYTAlJVMRMw EQYDVQQKEwphZG1pbjUgb3JnMQ8wDQYDVQQDEwZhZG1pbjUxHjAcBgkqhkiG9w0B CQEWD2FkbWluNUBtYWlsLmNvbTEUMBIGA1UEDRMLYWRtaW41IGRlc2MwZjAfBggq hQMHAQEBATATBgcqhQMCAiQABggqhQMHAQECAgNDAARAr29PncgHl5lwdTnodkAV di1Y9L1fMK/aPhlHgQhZkUjEo/tN4jV7t8oXC5HvuIdEXg5zKBJXJy5r3Ty4oESy 9KNvMG0wDAYDVR0TAQH/BAIwADATBgNVHSUEDDAKBggrBgEFBQcDAjAZBgNVHREE EjAQhg5jNHJvbGU6Ly9hZG1pbjAOBgNVHQ8BAf8EBAMCA+gwHQYDVR0O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56503
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Does it work with current master? There was a fix recently for something similar https://source.winehq.org/git/wine.git/commit/624e87a7252abd1f03598c68edc56e....
https://bugs.winehq.org/show_bug.cgi?id=56503
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- I checked myself, looks like this is the commit that fixed it. Please retest.
https://bugs.winehq.org/show_bug.cgi?id=56503
--- Comment #3 from Dmitry Klionsky dm.klionsky@gmail.com --- It's fixed indeed! Thanks!
https://bugs.winehq.org/show_bug.cgi?id=56503
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |624e87a7252abd1f03598c68edc | |56e6815af1ef2 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- Marking fixed then, thanks.
https://bugs.winehq.org/show_bug.cgi?id=56503
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.6.
https://bugs.winehq.org/show_bug.cgi?id=56503
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.0.x