You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Hariharasudhan R <ha...@gmail.com> on 2006/07/23 07:08:16 UTC

ECC with HTTPClient

Hi experts,

I want to use HTTPClient to try out ECC. How do I do this ? BouncyCastle and
JDK 1.6 beta support ECC. I'd like to use Bouncy Castle since it is a pure
java implementation.

I've read http://jakarta.apache.org/commons/httpclient/sslguide.html.

Do I need to implement a custom factory that implements
org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory ?

I've seen the contributed implementations but am not sure how to proceed.

Can someone give me pointers please ?

Thanks in Advance,
Hari.

Re: ECC with HTTPClient

Posted by Roland Weber <ht...@dubioso.net>.
Hello Hari,

> I want to use HTTPClient to try out ECC.

after some research, I assume that with ECC, you are not referring
to Error Correcting Codes but rather to Elliptic Curve Cryptography.

> I've read http://jakarta.apache.org/commons/httpclient/sslguide.html.

Good. :-)

> Do I need to implement a custom factory that implements
> org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory ?

Yes.

> I've seen the contributed implementations but am not sure how to proceed.

1. Configure the JSSE provider of your choice. If it's the
   one that ships with the JDK, you're already done.
   Otherwise, see the JSSE documentation for details.
http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html

2. Implement the secure protocol socket factory. Use an existing
   factory as a template to plug in your specific code. When creating
   an SSL socket, use setEnabledCipherSuites and/or setEnabledProtocols
   to enforce a cipher suite and/or protocol that uses ECC.
http://java.sun.com/j2se/1.4.2/docs/api/javax/net/ssl/SSLSocket.html#setEnabledCipherSuites(java.lang.String[])
http://java.sun.com/j2se/1.4.2/docs/api/javax/net/ssl/SSLSocket.html#setEnabledProtocols(java.lang.String[])

hope that helps,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org