Click here to Skip to main content
16,005,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalcreating DLL in VC++ Pin
Yank128-Mar-03 7:01
Yank128-Mar-03 7:01 
GeneralRe: creating DLL in VC++ Pin
Nemanja Trifunovic28-Mar-03 7:03
Nemanja Trifunovic28-Mar-03 7:03 
QuestionDetermining DLL location? Pin
Justin Cooke28-Mar-03 6:52
Justin Cooke28-Mar-03 6:52 
AnswerRe: Determining DLL location? Pin
Nemanja Trifunovic28-Mar-03 7:02
Nemanja Trifunovic28-Mar-03 7:02 
AnswerRe: Determining DLL location? Pin
Big Art28-Mar-03 7:03
Big Art28-Mar-03 7:03 
AnswerRe: Determining DLL location? Pin
RobJones29-Mar-03 6:54
RobJones29-Mar-03 6:54 
AnswerRe: Determining DLL location? Pin
Justin Cooke31-Mar-03 11:29
Justin Cooke31-Mar-03 11:29 
GeneralSOAP and client certificates Pin
Le centriste28-Mar-03 6:52
Le centriste28-Mar-03 6:52 
I would like to have a SOAP server that would require a client certificate to authenticate the client machines. On the client side, I use the CSecureEvtSyncSocket class. For those who know that class, there is a while loop in the clientHandshakeLoop method of that class.

Here is a part of that loop:

scRet = SEC_I_CONTINUE_NEEDED;

    while(scRet == SEC_I_CONTINUE_NEEDED        ||
          scRet == SEC_E_INCOMPLETE_MESSAGE     ||
          scRet == SEC_I_INCOMPLETE_CREDENTIALS) 
	{

        // Code stripped for clarity purposes.
        scRet = g_Sample_SecurityInit._SecurityFunc.InitializeSecurityContext(&m_hClientCreds,
                                          &m_hContext,
                                          NULL,
                                          dwSSPIFlags,
                                          0,
                                          SECURITY_NATIVE_DREP,
                                          &InBuffer,
                                          0,
                                          NULL,
                                          &OutBuffer,
                                          &dwSSPIOutFlags,
                                          &tsExpiry);

        // MOre code stripped.

        // If InitializeSecurityContext returned SEC_I_INCOMPLETE_CREDENTIALS,
        // then the server just requested client authentication. 
        //

        if(scRet == SEC_I_INCOMPLETE_CREDENTIALS)
        {
            //
            // Display trusted issuers info. 
            //

            getNewClientCredentials();


            //
            // Now would be a good time perhaps to prompt the user to select
            // a client certificate and obtain a new credential handle, 
            // but I don't have the energy nor inclination.
            //
            // As this is currently written, Schannel will send a "no 
            // certificate" alert to the server in place of a certificate. 
            // The server might be cool with this, or it might drop the 
            // connection.
            // 

            // Go around again.
            fDoRead = FALSE;
            scRet = SEC_I_CONTINUE_NEEDED;
            continue;
        }


    }


I configured IIS on the SOAP server to require Client Certificates. I know this should because the application works if this is not set, and returns errors if it is set.

The first call to InitializeSecurityContext returns SEC_I_CONTINUE_NEEDED but the second pass returns 0. What I don't understand, is why the call to InitializeSecurityContext never returns SEC_I_INCOMPLETE_CREDENTIALS which would indicate to the client that a client certificate is required.

Also, I would like to know if there is an article, preferably on CP Cool | :cool: , on how to manage client certificates, both on client and server, and how to access them programmatically.

Tx
GeneralConstructor & Destructor Pin
Makover28-Mar-03 6:08
Makover28-Mar-03 6:08 
GeneralRe: Constructor & Destructor Pin
Chris Losinger28-Mar-03 6:11
professionalChris Losinger28-Mar-03 6:11 
GeneralRe: Constructor & Destructor Pin
Daniel Turini28-Mar-03 6:20
Daniel Turini28-Mar-03 6:20 
GeneralRe: Constructor & Destructor Pin
Makover28-Mar-03 6:37
Makover28-Mar-03 6:37 
GeneralRe: Constructor & Destructor Pin
Maximilien28-Mar-03 6:49
Maximilien28-Mar-03 6:49 
GeneralRe: Constructor & Destructor Pin
Alvaro Mendez28-Mar-03 8:18
Alvaro Mendez28-Mar-03 8:18 
GeneralRe: Constructor & Destructor Pin
Tim Smith28-Mar-03 7:25
Tim Smith28-Mar-03 7:25 
GeneralRe: Constructor & Destructor Pin
jbarton28-Mar-03 7:36
jbarton28-Mar-03 7:36 
GeneralBuild like Visual Studio Pin
calgonit28-Mar-03 5:48
calgonit28-Mar-03 5:48 
GeneralOutlook Automation :-( ( attachment) Pin
Braulio Dez28-Mar-03 5:28
Braulio Dez28-Mar-03 5:28 
GeneralSolution... sh*tty automation Pin
Braulio Dez28-Mar-03 5:47
Braulio Dez28-Mar-03 5:47 
Generaldialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 5:21
professionalJoan M28-Mar-03 5:21 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 5:33
Big Art28-Mar-03 5:33 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 5:39
professionalJoan M28-Mar-03 5:39 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 5:57
Big Art28-Mar-03 5:57 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Joan M28-Mar-03 6:15
professionalJoan M28-Mar-03 6:15 
GeneralRe: dialog editor question (fine tuning the position of one control) Pin
Big Art28-Mar-03 6:51
Big Art28-Mar-03 6:51 

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.