BetterCloud / vault-java-driver

Zero-dependency Java client for HashiCorp's Vault
https://bettercloud.github.io/vault-java-driver/
333 stars 224 forks source link

Can't get the resource for my .pem certificate #242

Open LiamWBA opened 3 years ago

LiamWBA commented 3 years ago

I don't think this is an issue with this driver but please could you advise on how to fix this error when trying to reference my .pem certificate.

I am getting a null pointer exception when trying .pemResource for my .pem file which is in the same folder as the class im calling the .pemResource from. What is the path to my vault-public.pem for this method PLEASE!?! (It's driving me a little insane)

image

darkedges commented 3 years ago

Try using

final SslConfig sslConfig = new SslConfig().pemResource("/Avis/WTC/vault-public.pem").build();

image

Edit: I previously suggested it was a bug, but it was more my misunderstanding of how to reference resources from a Class deep in a package.