Re: [OpenSmalltalk/opensmalltalk-vm] Integrate Marcel Taeumel & Tobias Pape's v2 SSL plugin changes. (b2268f0)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Integrate Marcel Taeumel & Tobias Pape's v2 SSL plugin changes. (b2268f0)

David T Lewis
 

It seems that there is a type mismatch on 2nd argument here (and same further in code): because we currently use CertOpenSystemStoreA rather than CertOpenSystemStoreW and the compiler does warn us:

../../platforms/win32/plugins/SqueakSSL/sqWin32SSL.c:176:35: warning: incompatible pointer types passing 'unsigned short [3]' to parameter of type 'LPCSTR' (aka 'const char *') [-Wincompatible-pointer-types]
                hStore = CertOpenSystemStore(0, L"MY");
                                                ^~~~~
/usr/x86_64-w64-mingw32/sys-root/mingw/include/wincrypt.h:4432:83: note: passing argument to parameter 'szSubsystemProtocol' here
  WINIMPM HCERTSTORE WINAPI CertOpenSystemStoreA (HCRYPTPROV_LEGACY hProv, LPCSTR szSubsystemProtocol);


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@nicolas-cellier-aka-nice on b2268f0: It seems that there is a type mismatch on 2nd argument here (and same further in code): because we currently use `CertOpenSystemStoreA` rather than `CertOpenSystemStoreW` and the compiler does warn us:\r\n\r\n ../../platforms/win32/plugins/SqueakSSL/sqWin32SSL.c:176:35: warning: incompatible pointer types passing 'unsigned short [3]' to parameter of type 'LPCSTR' (aka 'const char *') [-Wincompatible-pointer-types]\r\n hStore = CertOpenSystemStore(0, L\"MY\");\r\n ^~~~~\r\n /usr/x86_64-w64-mingw32/sys-root/mingw/include/wincrypt.h:4432:83: note: passing argument to parameter 'szSubsystemProtocol' here\r\n WINIMPM HCERTSTORE WINAPI CertOpenSystemStoreA (HCRYPTPROV_LEGACY hProv, LPCSTR szSubsystemProtocol);\r\n"}],"action":{"name":"View Commit","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31635660"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31635660", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31635660", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Integrate Marcel Taeumel & Tobias Pape's v2 SSL plugin changes. (b2268f0)

David T Lewis
 

That means the UNICODE/_UNICODE defines are messed up.

Also, the last time we compiled, this fie was not cygwin-compatible and needed Visual studio.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@krono on b2268f0: That means the UNICODE/_UNICODE defines are messed up.\r\n\r\nAlso, the last time _we_ compiled, this fie was _not_ cygwin-compatible and needed Visual studio."}],"action":{"name":"View Commit","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31635694"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31635694", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31635694", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Integrate Marcel Taeumel & Tobias Pape's v2 SSL plugin changes. (b2268f0)

David T Lewis
In reply to this post by David T Lewis
 

Either we hardcode wide string and use explicit wide variant CertOpenSystemStoreW, or we use the generic CertOpenSystemStore function along with the TEXT macro, but mixing both is not a good idea IMO.
I would vote for TEXT macro https://docs.microsoft.com/en-us/windows/desktop/api/winnt/nf-winnt-text

If the plugin requires a -DUNICODE then we should add this to the plugin Makefile...

Note that I compiled from a fresh cygwin64...


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@nicolas-cellier-aka-nice on b2268f0: Either we hardcode wide string and use explicit wide variant `CertOpenSystemStoreW`, or we use the generic ` ` `CertOpenSystemStore` function along with the `TEXT` macro, but mixing both is not a good idea IMO.\r\nI would vote for TEXT macro https://docs.microsoft.com/en-us/windows/desktop/api/winnt/nf-winnt-text\r\n\r\nIf the plugin requires a `-DUNICODE` then we should add this to the plugin Makefile...\r\n\r\nNote that I compiled from a fresh cygwin64..."}],"action":{"name":"View Commit","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31641913"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31641913", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31641913", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Integrate Marcel Taeumel & Tobias Pape's v2 SSL plugin changes. (b2268f0)

David T Lewis
In reply to this post by David T Lewis
 

Hm. Using UNICODE and _UNICODE is what I would prefer.

I thinke these changes predate my playing-around with that stuf in the main Win32 branch and I was not aware back then.

So TEXT("MY") is the correct variant, I'd say


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@krono on b2268f0: Hm. Using `UNICODE` _and_ `_UNICODE` is what I would prefer.\r\n\r\nI thinke these changes predate my playing-around with that stuf in the main Win32 branch and I was not aware back then.\r\n\r\nSo `TEXT(\"MY\")` is the correct variant, I'd say"}],"action":{"name":"View Commit","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31641974"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31641974", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b2268f0d9af6907b3b913cae1251bef63d4ffe53#commitcomment-31641974", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>