Folks, this looks like an API error to me. The protocol security
should depend on the actual type of the factory passed to the
constructor, not on the type of the variable it is stored in!

Looking at the code, the only difference is the assignment of
"true" or "false" to the attribute "secure". I suggest to replace
this with an instanceof check in the constructor with the regular
ProtocolSocketFactory.

The constructor for the SecureProtocolSocketFactory can
then be dropped, or left as it is for API compatibility.

regards,
  Roland





Samuel BONNANFANT <[EMAIL PROTECTED]>
05.11.2003 17:31
Please respond to "Commons HttpClient Project"
 
        To:     Commons HttpClient Project 
<[EMAIL PROTECTED]>
        cc: 
        Subject:        RE: [Https & proxy] Impossible to connect


I finally succeed.
I found my error when debugging HttpClient code.

The only error was in my client part, I wrote :
ProtocolSocketFactory protoSocketFact = new
StrictSSLProtocolSocketFactory(_stNomFichierCert,
_stPassword, _bVerifServerHostName);

instead of :
StrictSSLProtocolSocketFactory protoSocketFact = new
StrictSSLProtocolSocketFactory(_stNomFichierCert,
_stPassword, _bVerifServerHostName);

and then I put :
Protocol myhttps = new Protocol("https",
protoSocketFact, 443);
Protocol.registerProtocol("https", myhttps);

=> The protocole was understood as "non secure"...
Thanks a lot for your help, Oleg & Glück !

--
Samuel



Reply via email to