Re: Re: BCJSSE close notify problem

Peter Dettman <[email protected]>
Newsgroups gmane.comp.encryption.bouncy-castle.devel
Message-ID <[email protected]>
There is a simple HTTPS client example here:

https://github.com/bcgit/bc-java/blob/master/tls/src/test/java/org/bouncycastle/jsse/provider/test/BCJSSEClientTest.java

Change 'host' to "www.google.com" and 'port' to 443 and you should see
that it works fine. Also, there is no need to write your own
SSLSocketFactory.

If you register BouncyCastleJsseProvider in java.security, then you do
not need Security.addProvider.

Regards,
Pete Dettman

On 23/5/18 8:40 am, Huangfu wrote:
> Hello Peter :
>    can to fix MyTLSSocketSecureFactory.java and
> TSLSocketConnectionFactory.java to Improve the error
> link www.google.com  is error,but other https link is  success not appear
> close_notify,This is what I don't understand,In test operation use eclipse
> is appear:
> //
> Caused by: org.w3c.dom.DOMException: NodeImpl Not found
> 	at org.apache.axis.message.NodeImpl.removeChild(NodeImpl.java:515)
> 	at org.apache.axis.message.NodeImpl.setParent(NodeImpl.java:789)
> 	at org.apache.axis.message.NodeImpl.setParentElement(NodeImpl.java:632)
> 	... 14 more
> 2018/5/23 上午 01:11:31 org.apache.axis.encoding.DeserializationContext
> pushNewElement
> //
> Not all errors, partly correct,if www.google.com is appear error ,Is there
> anything wrong with BCJSSE?
> and which contains a JSSE provider ("BCJSSE"). By registering the BCJSSE 
> provider, add TSLSocketConnectionFactory.java
> //
> if (Security.getProvider(BouncyCastleJsseProvider.PROVIDER_NAME) == null) {
> 		    Security.addProvider(new BouncyCastleJsseProvider());
> 		}
> //
> and java.security  use
> //
> security.provider.1=sun.security.provider.Sun
> security.provider.2=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
> security.provider.3=org.bouncycastle.jce.provider.BouncyCastleProvider
> //
> or have  you the better sample code can use ?
> 
> Regards 
> HwangFu
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> Sent from: http://bouncy-castle.1462172.n4.nabble.com/Bouncy-Castle-Dev-f1462173.html
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.