Я пытаюсь подключиться к REST Service.Когда я пытаюсь написать автономный jar и развернуть на сервере, инициировать запрос, используя jks на моем сервере, я могу получить ответ.
См. Приведенный ниже аргумент для запуска jar.
-Djavax.net.ssl.keyStore = C: \ keystore \ sdds.uat.dcs.com.jks -Djavax.net.ssl.keyStorePassword = sdsd.uat.dcs.com -Djavax.net.ssl.trustStore = C: \ keystore \ sdsd.uat.dcs.com.jks -Djavax.net.ssl.trustStorePassword = sdsd.uat.dcs.com -Djavax.net.debug = all
один и тот же код, если я интегрируюсь с моим весенним веб-приложением и развертываюсь на моем сервере JBOSS, использующем тот же самый jks. Я получаю исключение badcertificate.
Пожалуйста, смотрителоги ниже и помощь по моей просьбе.
2018-10-05 22:22:53,580 INFO [stdout] (default task-20) ***
ClientKeyExchange, RSA PreMasterSecret, TLSv1
2018-10-05 22:22:53,581 INFO [stdout] (default task-20) default task-20,
WRITE: TLSv1 Handshake, length = 269
2018-10-05 22:22:53,581 INFO [stdout] (default task-20) SESSION KEYGEN:
2018-10-05 22:22:53,582 INFO [stdout] (default task-20) PreMaster Secret:
2018-10-05 22:22:53,584 INFO [stdout] (default task-20) 0000: 03 03 B2 0D
2D CE F2 B1 6B 16 21 38 67 77 CA 64 ....-...k.!8gw.d
2018-10-05 22:22:53,586 INFO [stdout] (default task-20) 0010: 33 82 97 B6
67 3A 16 B3 F7 40 55 37 6F F2 ED BF 3...g:...@U7o...
2018-10-05 22:22:53,589 INFO [stdout] (default task-20) 0020: A2 6C 07 5B
F3 7A 14 CA 6B 89 BB DE A8 D0 E7 9C .l.[.z..k.......
2018-10-05 22:22:53,590 INFO [stdout] (default task-20) CONNECTION KEYGEN:
2018-10-05 22:22:53,590 INFO [stdout] (default task-20) Client Nonce:
2018-10-05 22:22:53,592 INFO [stdout] (default task-20) 0000: 5B B7 73 BD
65 C2 6C A7 6C 93 7E F1 41 B5 0E B1 [.s.e.l.l...A...
2018-10-05 22:22:53,594 INFO [stdout] (default task-20) 0010: D5 7A B5 0C
CF A5 0A C1 50 4F 00 C9 31 4D 73 7C .z......PO..1Ms.
2018-10-05 22:22:53,595 INFO [stdout] (default task-20) Server Nonce:
2018-10-05 22:22:53,597 INFO [stdout] (default task-20) 0000: 5B B7 73 BD 3
1 45 0E 5D 53 1B 30 D3 F6 4E 48 18 [.s.1E.]S.0..NH.
2018-10-05 22:22:53,599 INFO [stdout] (default task-20) 0010: 6E C8 95 AC
DA C5 B0 A2 6B 43 01 C7 DD 47 DC 39 n.......kC...G.9
2018-10-05 22:22:53,599 INFO [stdout] (default task-20) Master Secret:
2018-10-05 22:22:53,600 INFO [stdout] (default task-20) 0000: 85 CF C2 BC
C2 DB 52 A0 77 32 5C 06 1A 01 8D BD ......R.w2\.....
2018-10-05 22:22:53,602 INFO [stdout] (default task-20) 0010: 34 B5 F5 8E
B8 E2 B5 5A 64 F1 EF 1D 37 EC 34 9A 4......Zd...7.4.
2018-10-05 22:22:53,603 INFO [stdout] (default task-20) 0020: D9 6D EF 51
E1 58 9A 30 30 A7 9E BB B9 7C AC 3C .m.Q.X.00......<
2018-10-05 22:22:53,603 INFO [stdout] (default task-20) Client MAC write
Secret:
2018-10-05 22:22:53,605 INFO [stdout] (default task-20) 0000: 31 75 28 F8 96
ED 25 44 98 43 B6 66 F4 2E 06 53 1u(...%D.C.f...S
2018-10-05 22:22:53,605 INFO [stdout] (default task-20) 0010: 6C 58 F5 FE
lX..
2018-10-05 22:22:53,606 INFO [stdout] (default task-20) Server MAC write
Secret:
2018-10-05 22:22:53,607 INFO [stdout] (default task-20) 0000: 6B DD 1F 7F D3
DD 7D 67 E4 A5 26 4B 22 DD AE FD k......g..&K"...
2018-10-05 22:22:53,608 INFO [stdout] (default task-20) 0010: D1 18 87 FC ....
2018-10-05 22:22:53,608 INFO [stdout] (default task-20) Client write key:
2018-10-05 22:22:53,609 INFO [stdout] (default task-20) 0000: 18 C2 CE C0 CE
78 0C AD 54 5F 90 6F E1 3D 62 AE .....x..T_.o.=b.
2018-10-05 22:22:53,609 INFO [stdout] (default task-20) Server write key:
2018-10-05 22:22:53,611 INFO [stdout] (default task-20) 0000: 72 C8 38 57 7B
1E A1 D8 C9 18 EF B6 6D 9F 29 CD r.8W........m.).
2018-10-05 22:22:53,611 INFO [stdout] (default task-20) Client write IV:
2018-10-05 22:22:53,612 INFO [stdout] (default task-20) 0000: BF 03 DB 24 07
F2 A2 2A AD A6 1D 81 EE 98 A1 EA ...$...*........
2018-10-05 22:22:53,613 INFO [stdout] (default task-20) Server write IV:
2018-10-05 22:22:53,614 INFO [stdout] (default task-20) 0000: 11 74 17 ED B9
AE 3F E1 7F CC EA 67 C4 12 F4 E1 .t....?....g....
2018-10-05 22:22:53,615 INFO [stdout] (default task-20) default task-20,
WRITE: TLSv1 Change Cipher Spec, length = 1
2018-10-05 22:22:53,615 INFO [stdout] (default task-20) *** Finished
2018-10-05 22:22:53,616 INFO [stdout] (default task-20) verify_data: { 181,
172, 170, 98, 226, 234, 124, 130, 131, 95, 100, 144 }
2018-10-05 22:22:53,617 INFO [stdout] (default task-20) ***
2018-10-05 22:22:53,617 INFO [stdout] (default task-20) default task-20,
WRITE: TLSv1 Handshake, length = 48
2018-10-05 22:22:53,617 INFO [stdout] (default task-20) default task-20,
READ: TLSv1 Alert, length = 2
2018-10-05 22:22:53,618 INFO [stdout] (default task-20) default task-20,
RECV TLSv1 ALERT: fatal, bad_certificate
2018-10-05 22:22:53,618 INFO [stdout] (default task-20) %% Invalidated:
[Session-8, TLS_RSA_WITH_AES_128_CBC_SHA]
2018-10-05 22:22:53,619 INFO [stdout] (default task-20) default task-20,
called closeSocket()
2018-10-05 22:22:53,619 INFO [stdout] (default task-20) default task-20, h
****ndling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert:****
bad_certificate
2018-10-05 22:22:53,619 INFO [stdout] (default task-20) default task-20,
called close()
2018-10-05 22:22:53,620 INFO [stdout] (default task-20) default task-20,
called closeInternal(true)
2018-10-05 22:22:53,633 INFO [stdout] (default task-20) default task-20,
WRITE: TLSv1.2 Application Data, length = 530
2018-10-05 22:22:54,168 INFO [stdout] (default task-21) default task-21,
WRITE: TLSv1.2 Application Data, length = 3859
2018-10-05 22:22:55,547 INFO [stdout] (default I/O-2) Using SSLEngineImpl.
2018-10-05 22:22:55,548 INFO [stdout] (default I/O-2) default I/O-2, called
closeInbound()