Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build OpenSSL 1.1.1 for WINCE 6.0 #19354

Open
mdeihly opened this issue Oct 6, 2022 · 9 comments
Open

Build OpenSSL 1.1.1 for WINCE 6.0 #19354

mdeihly opened this issue Oct 6, 2022 · 9 comments
Labels
help wanted triaged: question The issue contains a question

Comments

@mdeihly
Copy link

mdeihly commented Oct 6, 2022

I need to build OpenSSL 1.1.1 for WINCE 6.0 using VS2008 or VS2005.
In my case I used VS2008, but I can use also use VS2005
I am using wcecompact as recommended in https://qiita.com/souju/items/94117c024862f57459c3

I did the modifications for wcecompact and then in batch file I did this.
set OSVERSION = WCE600
set PLATFORM=VC-CE
set TARGETCPU=x86
set LIB=C:\MYSDK\Lib\x86;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\lib\x86;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib
set INCLUDE=C:\MYSDK\Include\X86
set Path=C:\WINCE600\sdk\bin\i386\x86;C:\WINCE600\sdk\bin\i386;%Path%

nmake clean
C:\Strawberry\perl\bin\perl config.pl
nmake -f makefile

I got 2 .lib --> OK

then to build OpenSSL I did this:
set OSVERSION = WCE600
set PLATFORM=VC-CE
set TARGETCPU=x86
set WCECOMPAT=C:\wcecompat-master
set LIB=C:\MYSDK\Lib\x86;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\lib\x86;
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib
set INCLUDE=C:\MYSDK\Include\X86;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include
set Path=C:\WINCE600\sdk\bin\i386\x86;C:\WINCE600\sdk\bin\i386;%Path%

C:\Strawberry\perl\bin\perl Configure no-idea no-mdc2 no-rc5 no-ssl3 no-weak-ssl-ciphers no-async no-engine VC-CE

I got libcrypto-1_1.dll and libssl-1_1.dll --> OK

However, when I add the DLL on WINCE 6.0 machine and i use an OpenSSL function in project, .exe does NOT start.
Could somebody tell me why this happens?

In Build OpenSSL i also tried this:
set Path=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_cex86;%Path%
But never succeeds on machine the executable does not start.
Thanks in advance

@mdeihly mdeihly added the issue: question The issue was opened to ask a question label Oct 6, 2022
@t8m t8m added help wanted triaged: question The issue contains a question and removed issue: question The issue was opened to ask a question labels Oct 7, 2022
@aSoujyuTanaka
Copy link
Contributor

Have you solved the problem? One thing I noticed is that you have to set 'X86' for TARGETCPU environment, not 'x86'.

@mdeihly
Copy link
Author

mdeihly commented Oct 10, 2022

Have you solved the problem? One thing I noticed is that you have to set 'X86' for TARGETCPU environment, not 'x86'.

Thanks for your reply.
I substituted x86 by X86 as TARGETCPU. Subsequently, I got the 2 DLL (as always before this attempt) however the executable did not launch. Unfortunately it still doesn't work.
Could it be problem related to Operating System itself?

@aSoujyuTanaka
Copy link
Contributor

Could it be problem related to Operating System itself?

IMHO, not likely. I did tested just for ARMv7, but not for x86. Some investigation would be needed but unfortunately I don't have build environment anymore.

@renodr
Copy link

renodr commented Oct 14, 2022

Could it be problem related to Operating System itself?

Not likely in my opinion. I do have access to the tools necessary to make a build environment for CE 6.0 R3 and I'd be willing to try and reproduce this problem, but I'm going to need a pointer to some sample code or something I can build that would actually use the libraries that I generate. None of my CE 5/6/7 projects use OpenSSL, and they are also for x86 only.

@mdeihly
Copy link
Author

mdeihly commented Oct 14, 2022

I tried to generate SHA256 of a string. The .exe does not do anything. I tried also to use try catch, however i did not find any exception and the .exe did not launch.
For project, we are using VS 2005.

In set Path, I need to use C:\WINCE600 something like that, or paths related to VS 2005.

Thanks in advance

@renodr
Copy link

renodr commented Oct 14, 2022

I found some sample code here for doing an HTTPS connection to Google, but I can try doing a sha256 of a string as well. I'll try to repro it and see if I can come up with any advice for you (and I'll use VS2005)

@renodr
Copy link

renodr commented Oct 17, 2022

I had some difficulty with my development environment, but hopefully I can contribute more regarding this in a day or two.

@aSoujyuTanaka
Copy link
Contributor

I think you are opening duplicate issues of
#19633, #19605, #19482, #19399, #19303
Aside from that, I think you should close issues once the problems were solved.

BTW, I took part in a project of updating nPOPuk for CE.
https://www.hpcfactor.com/forums/forums/thread-view.asp?tid=20731
In page 14 of this thread, I built OpenSSL for WinCE x86. It works on a WinCE 6.0 real device and WEC7 emulator. I can share you what I did, if you still have this problem.

@renodr
Copy link

renodr commented Jan 28, 2023

I concur, those all look like duplicates.

I can still look into this if interested, but outside life got in the way of me doing this and I'm just starting to get time to look into other projects again. Looking at my build environment, it looks like I had it working on CE 6's emulator, as well as on an x86 machine

That's also a really cool thread. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted triaged: question The issue contains a question
Projects
None yet
Development

No branches or pull requests

4 participants