[英]mTLS X509 authenticated request in Java
我正在寻找一种在 Java 中实现以下 mTLS 身份验证请求的方法:
PFX=x509.pfx
curl --location --request POST 'https://example.com/' \
--cert-type p12 \
--cert "$PFX:mySecretPassword"
我正在使用一个用密码加密的 x509 pfx 文件。
对于服务器端,选择 Spring 这样的框架。 查看 Spring Security 文档了解更多信息。 这是介绍https://www.baeldung.com/x-509-authentication-in-spring-security
实现客户端只尝试okHttp,在客户端使用自定义证书通常很麻烦,例如在android的okhttp请求中使用证书
因此,请说明您到底想要什么,并提出更好的问题。
作为建议,尽量使用标准/默认配置。 https://www.baeldung.com/spring-boot-https-self-signed-certificate
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.