0 Replies Latest reply: Sep 27, 2011 6:01 AM by 800502 RSS

    javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate

    800502
      Hi,

      Received the following error during SSL handshake. Any pointers would help.
      ...
      ...
      ..
      ..

      *** ServerHelloDone
      [read] MD5 and SHA1 hashes: len = 4
      0000: 0E 00 00 00 ....
      *** Certificate chain
      ***
      *** ClientKeyExchange, RSA PreMasterSecret, TLSv1
      Random Secret: { 3, 1, 8, 98, 194, 222, 126, 68, 238, 63, 224, 191, 203, 35, 173, 232, 98, 115, 62, 27, 211, 138, 32, 170, 67, 191, 38, 62, 0, 197, 171, 2, 203, 160, 65, 248, 155, 134, 151, 17, 65, 101, 10, 0, 33, 22, 25, 194 }
      [write] MD5 and SHA1 hashes: len = 269
      0000: 0B 00 00 03 00 00 00 10 00 01 02 01 00 25 62 0D .............%b.
      0010: DB 01 AB 92 7C 20 22 FD 87 B0 48 02 57 8B 15 E7 ..... "...H.W...
      0020: AC 8C 4F 29 8D B2 27 F4 9A 2C BF 35 54 24 28 B1 ..O)..'..,.5T$(.
      0030: 8A E6 30 D5 44 DC 82 14 62 81 F9 56 FF 78 48 76 ..0.D...b..V.xHv
      0040: 85 94 0B 12 A1 61 B2 B7 7B 66 B1 A9 AD C7 99 07 .....a...f......
      0050: CB 26 11 B2 03 73 AF 15 48 CE 7D 18 64 49 02 CE .&...s..H...dI..
      0060: BD E7 B5 0D 75 D8 45 4F 6A CE 22 0A 4B A2 7E 18 ....u.EOj.".K...
      0070: AF 94 74 18 DF 1D D0 B5 CA 82 56 18 BF ED D1 97 ..t.......V.....
      0080: 4B 0D D5 B6 8B FD A5 4C 91 A3 F5 B4 15 AC 81 D0 K......L........
      0090: FA FC 0E 91 C2 A0 A5 9C BB 25 3B 57 33 03 AE 4D .........%;W3..M
      00A0: 59 07 B2 61 F9 6C 23 16 DC A0 C2 23 11 3B 53 8A Y..a.l#....#.;S.
      00B0: 02 4C E9 57 43 D0 B4 AC 90 F2 77 01 00 20 09 E4 .L.WC.....w.. ..
      00C0: DE 84 09 28 29 66 77 4C FA 93 C9 BB FA 81 77 9F ...()fwL......w.
      00D0: 8C DA 71 D0 EE 6B 72 DE 51 2B A7 83 68 B3 6C B2 ..q..kr.Q+..h.l.
      00E0: 5B A0 04 7B F5 FC 02 E1 BA 09 59 EC 3E 85 D7 1E [.........Y.>...
      00F0: 95 4F 6E AD ED 92 C7 53 C7 03 98 7E 26 83 4B 7A .On....S....&.Kz
      0100: 3E 12 52 1E 93 BC B4 C9 85 78 56 12 E6 >.R......xV..
      main, WRITE: TLSv1 Handshake, length = 269
      SESSION KEYGEN:
      PreMaster Secret:
      0000: 03 01 08 62 C2 DE 7E 44 EE 3F E0 BF CB 23 AD E8 ...b...D.?...#..
      0010: 62 73 3E 1B D3 8A 20 AA 43 BF 26 3E 00 C5 AB 02 bs>... .C.&>....
      0020: CB A0 41 F8 9B 86 97 11 41 65 0A 00 21 16 19 C2 ..A.....Ae..!...
      CONNECTION KEYGEN:
      Client Nonce:
      0000: 4E 81 9D 65 AA 6C F7 8E 3D 21 88 4A 67 AA 1B 99 N..e.l..=!.Jg...
      0010: 22 0E F0 AA BB 4A 18 20 54 28 CC F2 AC 2F 2C B2 "....J. T(.../,.
      Server Nonce:
      0000: 4E 81 9D 65 05 28 F7 96 B1 06 F2 90 9D 89 5E C6 N..e.(........^.
      0010: 54 61 AE DF 27 60 CC 9D 9E DD 33 FB D8 80 6F 84 Ta..'`....3...o.
      Master Secret:
      0000: 7C 3F 3C 60 08 A3 43 5A F2 CF 18 8D 30 D9 8C D4 .?<`..CZ....0...
      0010: 82 39 DC 43 69 D3 F4 28 AF 26 04 2F 1F 22 7E 07 .9.Ci..(.&./."..
      0020: D4 26 BD EC DE C5 53 50 53 C5 2E 7E 0D F1 D4 E9 .&....SPS.......
      Client MAC write Secret:
      0000: 97 EA A9 67 C8 D5 03 4A 6D 05 06 04 C0 CA A5 27 ...g...Jm......'
      0010: D7 A2 4A 64 ..Jd
      Server MAC write Secret:
      0000: 56 AC F5 90 FD CB 5B B4 00 2F 8A 7F 16 A0 CC 8F V.....[../......
      0010: 30 7E A1 60 0..`
      Client write key:
      0000: 00 0C CE 52 BF 48 FE A2 8A 35 EF 7C 8F 77 42 59 ...R.H...5...wBY
      Server write key:
      0000: 22 32 6B 21 C8 F8 30 4B B8 00 42 DC 59 C3 24 47 "2k!..0K..B.Y.$G
      ... no IV for cipher
      main, WRITE: TLSv1 Change Cipher Spec, length = 1
      *** Finished
      verify_data: { 184, 100, 168, 162, 169, 30, 181, 127, 217, 70, 217, 74 }
      ***
      [write] MD5 and SHA1 hashes: len = 16
      0000: 14 00 00 0C B8 64 A8 A2 A9 1E B5 7F D9 46 D9 4A .....d.......F.J
      main, WRITE: TLSv1 Handshake, length = 36
      main, waiting for close_notify or alert: state 1
      main, READ: TLSv1 Alert, length = 2
      main, RECV TLSv1 ALERT: fatal, bad_certificate
      main, called closeSocket()
      main, Exception while waiting for close javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
      main, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate

      javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
      at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
      at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:117)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1584)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:866)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.waitForClose(SSLSocketImpl.java:1366)
      at com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(HandshakeOutStream.java:103)
      at com.sun.net.ssl.internal.ssl.Handshaker.sendChangeCipherSpec(Handshaker.java:590)
      at com.sun.net.ssl.internal.ssl.ClientHandshaker.sendChangeCipherAndFinish(ClientHandshaker.java:698)
      at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:624)
      at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:160)
      at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
      at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:818)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1057)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1041)
      at InstallCert.main(InstallCert.java:62)