惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cloudbric
Cloudbric
V
Visual Studio Blog
L
LangChain Blog
A
About on SuperTechFans
B
Blog
T
Tenable Blog
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
博客园 - 三生石上(FineUI控件)
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Palo Alto Networks Blog
U
Unit 42
WordPress大学
WordPress大学
D
Darknet – Hacking Tools, Hacker News & Cyber Security
N
News and Events Feed by Topic
T
Threat Research - Cisco Blogs
C
Check Point Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence
Application and Cybersecurity Blog
Application and Cybersecurity Blog
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
NISL@THU
NISL@THU
Forbes - Security
Forbes - Security
S
Securelist
Security Archives - TechRepublic
Security Archives - TechRepublic
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
Latest news
Latest news
GbyAI
GbyAI
T
Troy Hunt's Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LINUX DO - 热门话题
V2EX - 技术
V2EX - 技术
小众软件
小众软件
Google DeepMind News
Google DeepMind News
K
Kaspersky official blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
Netflix TechBlog - Medium
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed

博客园 - silyvin

nat在第几层(二)出站流量需要nat? tomcat白名单(十)passthrough配合SNI究竟在第几层【重要】 sock5代理及隧道(三)dns用谁的【yetdone】 一个字符串可以是什么 微服务的同步异步(二)一个线程多个请求与一个连接多个请求(http2),客户端的多路复用 吞吐量、线程数、队列(好像没什么用) 去中心化的jwt(二)HS256、RS256、分级 什么叫无状态 直接进老年代的大对象指的是shallow还是retained 如何定义强一致和MVCC 三方支付为什么不用双向ssl,与U盾 事务消息与本地消息表的联系 再谈线程池或连接池容量怎么定 【删除】微信支付的收单机构 【删除】TLS前向保密 缓存一致性的根本原因 ssl pinning clienthello会不会拆粘包,为什么每次wireshark看到的都是正好的 转账tcc 安全采集jvm https代理服务器(八)安卓7 https代理服务器(七)假如被CA出卖 spi 微服务的同步异步【重要】 为什么tcp要用mss oauth为什么要传输secret https代理服务器(五)换电脑 多线程插入也是随机io,那为啥不用uuid【yetdone】 http长连接维护 【yet】
https代理服务器(六)再次java动态签发【成功】
silyvin · 2025-10-28 · via 博客园 - silyvin

1

X500Name canamem = new X500Name(caCertificate.getSubjectX500Principal().getName());

改为

X500Name issuerName = new JcaX509CertificateHolder(caCertificate).getSubject();

否则写入keystore时报错 KeyStoreException: Certificate chain is not valid

2

GeneralNames generalNames = new GeneralNames(
new GeneralName[]{new GeneralName(GeneralName.dNSName, subject),
new GeneralName(GeneralName.dNSName, "hhh.com")}
);
certificateBuilder.addExtension(
org.bouncycastle.asn1.x509.Extension.subjectAlternativeName,
false,
generalNames
);

必须,iphone实测

3

System.setProperty("javax.net.ssl.trustStore", "rootCA.pem");

这一句不能加

/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home!/java.base/sun/security/ssl/TrustStoreManager.class

static {
fileSep = File.separator;
defaultStorePath = GetPropertyAction.privilegedGetProperty("java.home") + fileSep + "lib" + fileSep + "security";
defaultStore = defaultStorePath + fileSep + "cacerts";
jsseDefaultStore = defaultStorePath + fileSep + "jssecacerts";
}

sun.security.ssl.TrustStoreManager.TrustStoreDescriptor#createInstance

String storePropName = System.getProperty("javax.net.ssl.trustStore", TrustStoreManager.TrustStoreDescriptor.jsseDefaultStore);

 否则好像这个地方报错,不记得了

public static SSLContext getSslContextSuper(String host) throws Exception {
SSLContext sslContext = SSLContext.getInstance("TLSv1");
KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
KeyStore ks = CertificateGenerator.genkeyStore(host);
char[] passArray = "changeit".toCharArray();
kmf.init(ks, passArray);
sslContext.init(kmf.getKeyManagers(), null, null);
return sslContext;
}

image

new Date(System.currentTimeMillis() - 60000),  

服务器证书starttime给扰动,否则iphone和mac时间不一样或者传输太快iphone会判定证书过期

5 碎碎念

image