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

推荐订阅源

S
SegmentFault 最新的问题
V
Vulnerabilities – Threatpost
博客园_首页
GbyAI
GbyAI
Martin Fowler
Martin Fowler
S
Secure Thoughts
Help Net Security
Help Net Security
Attack and Defense Labs
Attack and Defense Labs
大猫的无限游戏
大猫的无限游戏
量子位
腾讯CDC
博客园 - 叶小钗
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
V
V2EX
P
Proofpoint News Feed
T
Tailwind CSS Blog
U
Unit 42
A
Arctic Wolf
PCI Perspectives
PCI Perspectives
B
Blog
F
Fortinet All Blogs
B
Blog RSS Feed
H
Hacker News: Front Page
P
Privacy & Cybersecurity Law Blog
Scott Helme
Scott Helme
G
GRAHAM CLULEY
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
H
Heimdal Security Blog
人人都是产品经理
人人都是产品经理
Forbes - Security
Forbes - Security
TaoSecurity Blog
TaoSecurity Blog
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
Security Archives - TechRepublic
Security Archives - TechRepublic
Y
Y Combinator Blog
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Latest news
Latest news
P
Privacy International News Feed
SecWiki News
SecWiki News
L
LINUX DO - 最新话题
M
MIT News - Artificial intelligence
W
WeLiveSecurity
博客园 - 聂微东
T
Tor Project blog
T
Troy Hunt's Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Engineering at Meta
Engineering at Meta

博客园 - 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代理服务器(六)再次java动态签发【成功】 多线程插入也是随机io,那为啥不用uuid【yetdone】 http长连接维护 【yet】
https代理服务器(五)换电脑
silyvin · 2025-10-19 · via 博客园 - silyvin

brew install mkcert

mkcert -CAROOT

没有

2

mkcert -install

mkcert -CAROOT

有了

3

启动MyFiddler,手机连接,失败

拷贝原key和证书至root目录

再次mkcert -install

5 好了

6 公钥摘要

public class PemReader {
    public static X509Certificate readCertificateFromPem(String filePath) throws Exception {
        try (InputStream is = new FileInputStream(filePath)) {
            CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
            X509Certificate certificate = (X509Certificate) certificateFactory.generateCertificate(is);
            return certificate;
        }
    }

    public static void main(String[] args) {
        try {
            X509Certificate cert = readCertificateFromPem("/Users/Zhuanz1/Library/Application Support/mkcert/rootCA.pem");
            System.out.println("Certificate Subject: " + cert.getSubjectX500Principal());
            PublicKey publicKey = cert.getPublicKey();
            byte []k = publicKey.getEncoded();
            System.out.println(encrypt(k));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static String encrypt(byte[] input) {
        try {
            MessageDigest md = MessageDigest.getInstance("MD5");
            md.update(input);
            byte[] digest = md.digest();
            StringBuilder sb = new StringBuilder();
            for (byte b : digest) {
                sb.append(String.format("%02x", b & 0xff));
            }
            return sb.toString();
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

Certificate Subject: CN=mkcert mac@macdeMacBook.local, OU=mac@macdeMacBook.local, O=mkcert development CA
Disconnected from the target VM, address: '127.0.0.1:64269', transport: 'socket'
942fb8cd5be910509faf8a39dd189240

7 在旧电脑运行6的代码同样结果