mirror of
https://github.com/go-i2p/go-i2p.git
synced 2025-07-04 05:26:51 -04:00
working on key certificates and keys and cert
This commit is contained in:
@ -5,9 +5,13 @@ import "testing"
|
||||
func TestCertificateTypeIsFirstByte(t *testing.T) {
|
||||
bytes := []byte{0x03, 0x00, 0x00}
|
||||
certificate := Certificate(bytes)
|
||||
if certificate.Type() != 0x03 {
|
||||
cert_type, err := certificate.Type()
|
||||
if cert_type != 3 {
|
||||
t.Fatal("certificate.Type() is not first byte")
|
||||
}
|
||||
if err != nil {
|
||||
t.Fatal("certificate.Type returned error on valid data:", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCertificateLengthCorrect(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user