Hi.
It occured, that the certificates I was using had some unsupported (by
java) extensions. I figure it out by running piece of my code on standard J2SE jre and it gave me sensible exception, that those certificate extensions are not supported.
I had to write my own TrustFactoryManager(or something like this, can't remember the name right now) class.