validators: add SetParent()

This commit is contained in:
Yousong Zhou
2019-06-09 16:02:39 +00:00
parent b8552b72a1
commit 5fb930c3a8
2 changed files with 19 additions and 14 deletions
@@ -37,7 +37,7 @@ func NewPEMValidator(key string) *ValidatorPEM {
v := &ValidatorPEM{
Validator: Validator{Key: key},
}
v.parent = v
v.SetParent(v)
return v
}
@@ -101,7 +101,7 @@ func NewCertificateValidator(key string) *ValidatorCertificate {
v := &ValidatorCertificate{
ValidatorPEM: *NewPEMValidator(key),
}
v.parent = v
v.SetParent(v)
return v
}
@@ -232,7 +232,7 @@ func NewPrivateKeyValidator(key string) *ValidatorPrivateKey {
v := &ValidatorPrivateKey{
ValidatorPEM: *NewPEMValidator(key),
}
v.parent = v
v.SetParent(v)
return v
}