Skip to content

Commit 97c560c

Browse files
committed
Update a few API calls and variables referencing certificates ssh.
1 parent 65805ae commit 97c560c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

utils/cautils/offline.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ func (c *OfflineCA) SSHSign(req *api.SSHSignRequest) (*api.SSHSignResponse, erro
263263
if err != nil {
264264
return nil, errors.Wrap(err, "error parsing publicKey")
265265
}
266-
ctx := provisioner.NewContextWithMethod(context.Background(), provisioner.SignSSHMethod)
266+
ctx := provisioner.NewContextWithMethod(context.Background(), provisioner.SSHSignMethod)
267267
opts, err := c.authority.Authorize(ctx, req.OTT)
268268
if err != nil {
269269
return nil, err
@@ -297,7 +297,7 @@ func (c *OfflineCA) SSHRevoke(req *api.SSHRevokeRequest) (*api.SSHRevokeResponse
297297
MTLS: false,
298298
}
299299

300-
ctx := provisioner.NewContextWithMethod(context.Background(), provisioner.RevokeSSHMethod)
300+
ctx := provisioner.NewContextWithMethod(context.Background(), provisioner.SSHRevokeMethod)
301301
if _, err := c.authority.Authorize(ctx, opts.OTT); err != nil {
302302
return nil, err
303303
}
@@ -311,12 +311,12 @@ func (c *OfflineCA) SSHRevoke(req *api.SSHRevokeRequest) (*api.SSHRevokeResponse
311311
// SSHRenew is a wrapper on top of certificates SSHRenew method. It returns an
312312
// api.SSHRenewResponse.
313313
func (c *OfflineCA) SSHRenew(req *api.SSHRenewRequest) (*api.SSHRenewResponse, error) {
314-
ctx := provisioner.NewContextWithMethod(context.Background(), provisioner.RenewSSHMethod)
314+
ctx := provisioner.NewContextWithMethod(context.Background(), provisioner.SSHRenewMethod)
315315
_, err := c.authority.Authorize(ctx, req.OTT)
316316
if err != nil {
317317
return nil, err
318318
}
319-
oldCert, err := provisioner.ExtractSSHPOPCert(req.OTT)
319+
oldCert, _, err := provisioner.ExtractSSHPOPCert(req.OTT)
320320
if err != nil {
321321
return nil, err
322322
}
@@ -331,12 +331,12 @@ func (c *OfflineCA) SSHRenew(req *api.SSHRenewRequest) (*api.SSHRenewResponse, e
331331
// SSHRekey is a wrapper on top of certificates SSHRekey method. It returns an
332332
// api.SSHRekeyResponse.
333333
func (c *OfflineCA) SSHRekey(req *api.SSHRekeyRequest) (*api.SSHRekeyResponse, error) {
334-
ctx := provisioner.NewContextWithMethod(context.Background(), provisioner.RekeySSHMethod)
334+
ctx := provisioner.NewContextWithMethod(context.Background(), provisioner.SSHRekeyMethod)
335335
signOpts, err := c.authority.Authorize(ctx, req.OTT)
336336
if err != nil {
337337
return nil, err
338338
}
339-
oldCert, err := provisioner.ExtractSSHPOPCert(req.OTT)
339+
oldCert, _, err := provisioner.ExtractSSHPOPCert(req.OTT)
340340
if err != nil {
341341
return nil, err
342342
}

0 commit comments

Comments
 (0)