I2P Address: [http://git.idk.i2p]

Verified Commit f1139774 authored by idk's avatar idk
Browse files

refactor certs, keycerts

parent 86dc3233
......@@ -42,14 +42,13 @@ func TestPublicKeyTypeReturnsCorrectInteger(t *testing.T) {
func TestPublicKeyTypeReportsWhenDataTooSmall(t *testing.T) {
assert := assert.New(t)
//key_cert, err := NewKeyCertificate([]byte{0x05, 0x00, 0x02, 0x00, 0x00})
//_, err := key_cert.PublicKeyType()
_, err := NewKeyCertificate([]byte{0x05, 0x00, 0x02, 0x00, 0x00})
//_, err = key_cert.PublicKeyType()
key_cert, err := NewKeyCertificate([]byte{0x05, 0x00, 0x02, 0x00, 0x00})
pk_type := key_cert.PublicKeyType()
if assert.NotNil(err) {
assert.Equal("error parsing key certificate: not enough data", err.Error(), "correct error message should be returned")
}
assert.Equal(pk_type, 0, "PublicKeyType() did not return correct typec")
}
func TestConstructPublicKeyReportsWhenDataTooSmall(t *testing.T) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment