I have the following test that fails reporting a key mismatch. func TestKeyEqual(t *testing.T) { key, err := rsa.GenerateKey(rand.Reader, 2048) if err != nil { t.Fatal("failed generating private key: ", err) } if !key.PublicKey.Equal(key.PublicKey) { t.Fatal("key mismatch") } }
Why is that ? Shouldn’t it return true ? Initially I compared key after save and reload read, and since it failed, I just tested the same key for equality to verify that Equal was working as expected. Apparently it does not or I’m doing something wrong. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/5b957539-b3c6-4c22-8322-3a422cd83925n%40googlegroups.com.