forked from TrueCloudLab/certificates
Fix load of gcp and aws provisioner by certificate.
This commit is contained in:
parent
da93e40f90
commit
a7f06c765d
1 changed files with 6 additions and 1 deletions
|
@ -93,8 +93,13 @@ func (c *Collection) LoadByCertificate(cert *x509.Certificate) (Interface, bool)
|
||||||
if _, err := asn1.Unmarshal(e.Value, &provisioner); err != nil {
|
if _, err := asn1.Unmarshal(e.Value, &provisioner); err != nil {
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
if provisioner.Type == int(TypeJWK) {
|
switch Type(provisioner.Type) {
|
||||||
|
case TypeJWK:
|
||||||
return c.Load(string(provisioner.Name) + ":" + string(provisioner.CredentialID))
|
return c.Load(string(provisioner.Name) + ":" + string(provisioner.CredentialID))
|
||||||
|
case TypeAWS:
|
||||||
|
return c.Load("aws:" + string(provisioner.Name))
|
||||||
|
case TypeGCP:
|
||||||
|
return c.Load("gcp:" + string(provisioner.Name))
|
||||||
}
|
}
|
||||||
return c.Load(string(provisioner.CredentialID))
|
return c.Load(string(provisioner.CredentialID))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue