Hi Chris,

thank you for your reply!
On the tomcat everything works fine, I can see that the client certificate
is checked via my JSSE-Implementation in both cases!

This is the stacktrace from my test:

java.net.SocketException: Software caused connection abort: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:377)
at sun.security.ssl.OutputRecord.write(OutputRecord.java:363)
at
sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:830)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:801)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:672)
at sun.security.ssl.Handshaker.sendChangeCipherSpec(Handshaker.java:966)
at
sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(ClientHandshaker.java:1087)
at
sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:1006)
at
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:285)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:804)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1016)
at
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:702)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at
org.apache.commons.httpclient.methods.StringRequestEntity.writeRequest(StringRequestEntity.java:146)
at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at sendAndReceiveMessageFromVsddWithTLS(OCSPTestUtil.java:186)
at testTLSCorruptedClientCert(TLSOcspTest.java:653)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at
org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at
org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at
org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at
org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at
org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:242)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:137)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

The thing that I could really not understand is why it is a different
behavior when testing locally and remote.
Maybe that something happens to fast when doing the test locally.

I found that when I run tomcat in debug mode and I connect my IDE to it the
delay is sufficent to run the test succesfully...

Really strange...

Best regards,
Nancee



2014/1/9 Christopher Schultz <ch...@christopherschultz.net>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Nancee,
>
> On 1/8/14, 4:56 AM, Nancee Riehl wrote:
> > Is this the right mailing-list for my question?
>
> Yes! Welcome.
>
> > I'm writing a JUNIT-Test to test a connection to tomcat 7.0.47
> > over HTTPS/TLSv1.1 with a corrupted Client-Certificate.
> >
> > When I run my test against a remote tomcat everything works fine, I
> > get an SSLHandshakeException.
> >
> > When I run the same test against a local tomcat I get this error:
> > java.net.SocketException: Software caused connection abort: socket
> > write error
> >
> > Do you have an idea why there are diffrent Exceptions? The
> > configurations and versions of both tomcats are the same.
>
> What is the full stack trace? Does the server have any error in its
> log when the client gets this error?
>
> If you don't make arrangements for Java's HttpsURLConnection class, it
> will choke if the /server/ certificate does not validate (including
> things like hostname verification). I usually see a different kind of
> error in these cases, but the real error might be hidden behind
> something else.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJSzyDnAAoJEBzwKT+lPKRYeXgP/2NWfmCotaovqchxNPcgdKTc
> u7qHVrwbC4O9kB6Mm90Ukit/YrpAsAggBUrHrvrYO4DCD0IcJXs4cl7fQtGQixau
> o1TdJX9NbVOYyzh1YrygRhs9LOxUFExICbOb61hIJbgWztAAj5Q2zle5EiiJyivt
> rusU517dS5+S49WCsXHR1X8FBsX+MY36hnFnTLwPoC2ICz1mPBv3/mXsP43dFHPw
> fI8HXD3mIPTlVwt09lFe5qyFnHYyydJSTE5OazQcNFdkBBiEREQ0/QaS2mBmIp1A
> RXQgkx1MtXp/1dMZ26A7l07kg3yISFux8mHG3GlhG8HMJTOunzTq80e4Z5v+h5io
> 47weHo4sWZc8AmtAxbQACrmFNkW/YVj2UGXHQNKo033NeZBv1q3unoQYz2JY4V4z
> jgJfjoYFYfXmq4yJveZJ3gfdPxM7WL0KM5381h8IU3E9HkExDJvt7fFKAgcFpIj0
> 3k9nHL7S/dWWx0mA0ZpD0J3vEmk4rNkHan3skr4+vp6x5QOPY3StbH/Jbw2cR7wD
> H+6FVgZalb0ezTtfIDcT31fQNowKASy2wbqAZPzgftSvQOvurHEKo88rZy94YDL0
> IDLPyMQNTRdQ6xAHKPq3FCdHFsc2Zu0BYfyPwUUbDR3TuGkY22fF4gf6z7x24CKq
> wNOv5T+Naox1JJZL7f/A
> =y+5F
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to