You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.
老哥,我发现你代码中关于MySQL校验包 WritePublicKeyAuthPacket有问题, 刚刚验证通过了。
sha1v := sha1.New()
enc, _ := rsa.EncryptOAEP(sha1v, rand.Reader, pub.(*rsa.PublicKey), plain, nil)
data = make([]byte, 4+len(enc))
copy(data[4:], enc)
return dc.writePacket(data)
通过对比,不出意外的话这个方法应该是借用的go-sql-driver中的相关代码,其中data = make([]byte, 4+len(enc); copy(data[4:], enc)相对于gaea来说是多余的,gaea在执行writePacket方法时,会在请求体data前面加上添加四个字节作为header。 此步骤有冗余,导致公共秘钥校验失败。
The text was updated successfully, but these errors were encountered: