示例#1
0
文件: ztls_ka.go 项目: aaspring/zgrab
func (ka *dheKeyAgreement) DHParams() *keys.DHParams {
	out := new(keys.DHParams)
	if ka.p != nil {
		out.Prime = new(big.Int).Set(ka.p)
	}
	if ka.g != nil {
		out.Generator = new(big.Int).Set(ka.g)
	}
	if ka.yServer != nil {
		out.ServerPublic = new(big.Int).Set(ka.yServer)
	}
	return out
}
示例#2
0
文件: ztls_ka.go 项目: aaspring/zgrab
func (ka *dheKeyAgreement) ClientDHParams() *keys.DHParams {
	out := new(keys.DHParams)
	if ka.p != nil {
		out.Prime = new(big.Int).Set(ka.p)
	}
	if ka.g != nil {
		out.Generator = new(big.Int).Set(ka.g)
	}
	if ka.yClient != nil {
		out.ClientPublic = new(big.Int).Set(ka.yClient)
	}
	if ka.xOurs != nil {
		out.ClientPrivate = new(big.Int).Set(ka.xOurs)
	}
	return out
}