@@ -68,8 +68,10 @@ func GenerateAndSignKey(client *api.Client, orgID string, resourceID string, use
6868 } else if initResp .MessageID != 0 {
6969 messageIDs = []int64 {initResp .MessageID }
7070 } else {
71- if err := validateSignedCert (pubKey , initResp .Certificate ); err != nil {
72- return "" , "" , "" , nil , fmt .Errorf ("SSH error: invalid certificate: %w" , err )
71+ if initResp .AuthDaemonMode != "native" {
72+ if err := validateSignedCert (pubKey , initResp .Certificate ); err != nil {
73+ return "" , "" , "" , nil , fmt .Errorf ("SSH error: invalid certificate: %w" , err )
74+ }
7375 }
7476 // return the data as this is okay
7577 return privPEM , pubKey , initResp .Certificate , initResp , nil
@@ -88,8 +90,10 @@ func GenerateAndSignKey(client *api.Client, orgID string, resourceID string, use
8890 if msg .Error != nil && * msg .Error != "" {
8991 return "" , "" , "" , nil , fmt .Errorf ("SSH error: %s" , * msg .Error )
9092 }
91- if err := validateSignedCert (pubKey , initResp .Certificate ); err != nil {
92- return "" , "" , "" , nil , fmt .Errorf ("SSH error: invalid certificate: %w" , err )
93+ if initResp .AuthDaemonMode != "native" {
94+ if err := validateSignedCert (pubKey , initResp .Certificate ); err != nil {
95+ return "" , "" , "" , nil , fmt .Errorf ("SSH error: invalid certificate: %w" , err )
96+ }
9397 }
9498 return privPEM , pubKey , initResp .Certificate , initResp , nil
9599 }
0 commit comments