• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Spring 5.0 Webclient with SSL

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spring 5.0, doesn't support Java SSL. So using Reactor Netty SSLContext.

Want to use one-way communication (Server-side authentication).

Created KeyStore and TrustStore using Java KeyTool.



KeyManagerFactory keyManagerFactory=null;
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
InputStream readStream = new FileInputStream("serverkeystore.p12");
ks.load(readStream, pass.toCharArray());
readStream.close();
keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
keyManagerFactory.init(ks, "pass".toCharArray());

Setting in WebClient request, getting below exception ?.

Exception
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Can you help with examples and pointers ?.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use Netty inside of spring. Spring webflux is nothing more than a wrapper for a reactor core (pun intended.) Webflux uses reactor as its engine.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic