> I try to establish a connection to a SSL socket server , by using ssl
> socket client (code below) and I got an exception, can you help me pls?
> The server is ok I did a connection with sslopen client.
> thanks
> newcipher[0]="TLS_DH_anon_WITH_AES_128_CBC_SHA";
> output:
> TLS_DH_anon_WITH_AES_128_CBC_SHA
>
> javax.net.ssl.SSLException: java.lang.RuntimeException: Could not
> generate DH keypair
> Caused by: java.security.InvalidAlgorithmParameterException: Prime size
> must be multiple of 64, and can only range from 512 to 1024 (inclusive)
Looks like there is some problem with the size of the prime you are
using. Do you HAVE to use "DH_anon"? Could you not allow the SSL/TLS
suite to negotiate a shared algorithm?
You may also want to look at http://dawes.za.net/rogan/PKCS11Test.java,
which shows a whole bunch of client-side SSL-related techniques in a
simple example. Some may be of use to you.
Regards,
Rogan