lqqyt2423 / go-mitmproxy

mitmproxy implemented with golang. 用 Golang 实现的中间人攻击(Man-in-the-middle),解析、监测、篡改 HTTP/HTTPS 流量。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

直接运行二进制文件报错

liutianping0326 opened this issue · comments

➜  bin ./go-mitmproxy
FATA[2022-03-21T21:03:15+08:00] x509: failed to parse private key (use ParsePKCS1PrivateKey instead for this key format)

也遇到了这个错误,clone源代码fix了一下:
cert.go

key, err := x509.ParsePKCS1PrivateKey(keyDERBlock.Bytes)   //按错误提示改为ParsePKCS1PrivateKey 
if err != nil {
return err
}
ca.PrivateKey = *key
// if v, ok := key.(*rsa.PrivateKey); ok {
// 	ca.PrivateKey = *v
// } else {
// 	return errors.New("found unknown rsa private key type in PKCS#8 wrapping")
// }

@babykick 感谢
@Kevin-liutianping 已经修复了
8ed9ad1