Click here to Skip to main content
16,007,885 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDebugging multi-threaded apps in VS IDE? Pin
jbay@nebs.com25-Sep-01 5:20
jbay@nebs.com25-Sep-01 5:20 
AnswerRe: Debugging multi-threaded apps in VS IDE? Pin
Jeremy Pullicino25-Sep-01 22:12
Jeremy Pullicino25-Sep-01 22:12 
Generalcontextmenu on treeviewctrl in wtl Pin
Steffen25-Sep-01 5:03
Steffen25-Sep-01 5:03 
GeneralRe: contextmenu on treeviewctrl in wtl Pin
25-Sep-01 8:12
suss25-Sep-01 8:12 
GeneralRe: contextmenu on treeviewctrl in wtl Pin
25-Sep-01 21:37
suss25-Sep-01 21:37 
GeneralPrinting of Selected Tree Nodes...... Pin
25-Sep-01 4:10
suss25-Sep-01 4:10 
GeneralRe: Printing of Selected Tree Nodes...... Pin
Tomasz Sowinski25-Sep-01 5:14
Tomasz Sowinski25-Sep-01 5:14 
GeneralSecure socket client under Win CE Pin
25-Sep-01 4:07
suss25-Sep-01 4:07 
Netmeisters

I am trying to write an application for the Pocket PC which, among other things, should connect to a Linux server via a secure socket. The server has OpenSSL installed.

Everything works with ordinary, unsecured sockets, and in principle, all I need to do now is "turn on" SSL for the sockets. As far as I can tell, this should require only two steps, setsocket()to "turn on" security, and wsaioctl() to register a certificate validation callback. These two steps should occur between the socket() call that creates the socket, and the connect() call that connects to the server.

Unfortunately, I haven't been able to get this to work.

I have

s=socket(AF_INET, SOCK_STREAM, 0);
DWORD optval = SO_SEC_SSL;
err=setsockopt(s, SOL_SOCKET, SO_SECURE, (const char *)&optval, sizeof(optval));
if (err==SOCKET_ERROR) {
errmsg.Format(_T("Error in setsockopt for SO_SECURE %d"), WSAGetLastError());
MessageBox(errmsg); }
connect(....

I get err=10042, "An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call."

So setsockopt() doesn't work. I would like to know if anyone has any idea why. I should mention that I have only tested this with the Pocket PC emulator, since I don't currently have a physical device to test it on. Perhaps something is wrong with the emulator's support for SSL?

Any example code illustrating an SSL client for Windows CE would also be much appreciated.

Thank you,

Matthew Fleming
mgf@mcw.edu

GeneralMultiline CEdit control question Pin
25-Sep-01 3:25
suss25-Sep-01 3:25 
GeneralRe: Multiline CEdit control question Pin
Tomasz Sowinski25-Sep-01 4:03
Tomasz Sowinski25-Sep-01 4:03 
GeneralRe: Multiline CEdit control question Pin
25-Sep-01 4:19
suss25-Sep-01 4:19 
GeneralRe: Multiline CEdit control question Pin
DanYELL25-Sep-01 4:51
DanYELL25-Sep-01 4:51 
GeneralClasses with resources Pin
Adi Shavit25-Sep-01 3:01
Adi Shavit25-Sep-01 3:01 
GeneralRe: Classes with resources Pin
Tomasz Sowinski25-Sep-01 4:01
Tomasz Sowinski25-Sep-01 4:01 
GeneralRe: Classes with resources Pin
Adi Shavit30-Sep-01 6:00
Adi Shavit30-Sep-01 6:00 
GeneralRe: Classes with resources Pin
Rashid Thadha25-Sep-01 5:46
Rashid Thadha25-Sep-01 5:46 
Questionhow to convert from device coordinates into physical coordinates Pin
pathi25-Sep-01 2:59
pathi25-Sep-01 2:59 
AnswerRe: how to convert from device coordinates into physical coordinates Pin
Tomasz Sowinski25-Sep-01 3:59
Tomasz Sowinski25-Sep-01 3:59 
GeneralCHtmlView question Pin
Nick Armstrong25-Sep-01 2:01
Nick Armstrong25-Sep-01 2:01 
GeneralRe: CHtmlView question Pin
Jon25-Sep-01 2:52
Jon25-Sep-01 2:52 
GeneralRe: CHtmlView question Pin
Nick Armstrong25-Sep-01 3:15
Nick Armstrong25-Sep-01 3:15 
QuestionConnection Points between ATL and MFC ?? Pin
Christian Graus25-Sep-01 1:57
protectorChristian Graus25-Sep-01 1:57 
AnswerRe: Connection Points between ATL and MFC ?? Pin
Michael P Butler25-Sep-01 2:32
Michael P Butler25-Sep-01 2:32 
GeneralRe: Connection Points between ATL and MFC ?? Pin
Christian Graus25-Sep-01 2:58
protectorChristian Graus25-Sep-01 2:58 
GeneralQ: Security Attributes on Files Pin
Mark Terrano25-Sep-01 1:27
Mark Terrano25-Sep-01 1:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.