I
Ian Pilcher
This is a bit weird. I am writing an SSLSocketFactory for use with the
PostgreSQL JDBC driver. Unfortunately, the driver imposes some very
inconvenient criteria on the factory class.
http://jdbc.postgresql.org/documentation/91/ssl-factory.html
In particular, the class must have a zero-argument constructor or a
constructor that takes a single String argument. My challenge is to
somehow pass a java.security.cert.X509Certificate to this constructor.
The only idea I've been able to come up with thus far is to serialize
the certificate to a ByteArrayOutputStream, convert that to a String,
and reverse the process in the constructor.
Does anyone have a better idea?
If not, is there a character set that can handle all values 0-255?
Thanks!
PostgreSQL JDBC driver. Unfortunately, the driver imposes some very
inconvenient criteria on the factory class.
http://jdbc.postgresql.org/documentation/91/ssl-factory.html
In particular, the class must have a zero-argument constructor or a
constructor that takes a single String argument. My challenge is to
somehow pass a java.security.cert.X509Certificate to this constructor.
The only idea I've been able to come up with thus far is to serialize
the certificate to a ByteArrayOutputStream, convert that to a String,
and reverse the process in the constructor.
Does anyone have a better idea?
If not, is there a character set that can handle all values 0-255?
Thanks!