Skip to content

Commit

Permalink
Fix revocation
Browse files Browse the repository at this point in the history
  • Loading branch information
fritterhoff committed Jun 28, 2022
1 parent 84f2493 commit 1947051
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/pki-service/pkg/grpc/ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ func (s *sslAPIServer) RevokeCertificate(ctx context.Context, req *pb.RevokeSslR
err = s.client.SslService.RevokeBySslID(fmt.Sprint(c.SslId), req.Reason)
if sectigoError, ok := err.(*sectigo.ErrorResponse); ok && sectigoError.Code == -102 {
logger.Info("Certificate already revoked")
} else {
} else if err != nil {
logger.Error("Revoking request failed", zap.Error(err))
return errorReturn(err, logger)
}
_, err = s.db.Certificate.UpdateOneID(c.ID).SetStatus(certificate.StatusRevoked).Save(ctx)
Expand Down Expand Up @@ -335,7 +336,9 @@ func (s *sslAPIServer) RevokeCertificate(ctx context.Context, req *pb.RevokeSslR
if sectigoError, ok := err.(*sectigo.ErrorResponse); ok && sectigoError.Code == -102 {
logger.Info("Certificate already revoked")
} else {
logger.Error("Revoking request failed", zap.Error(err))
ret <- struct{ err error }{err}
return
}
}
_, err = s.db.Certificate.UpdateOneID(c.ID).SetStatus(certificate.StatusRevoked).Save(ctx)
Expand Down

0 comments on commit 1947051

Please sign in to comment.