Git Product home page Git Product logo

sectigo-client's Introduction

Unofficial Sectigo Client

This repository provides an (unofficial) client for the sectigo Web-API. It covers the most aspects required for managing certificates, domains or ACME-Accounts. At the moment some less important functions or options are not covered by this library.

sectigo-client's People

Contributors

dependabot[bot] avatar fritterhoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sectigo-client's Issues

Error during expiry date unmarshalling in ListByPersonEmail response

Hello @fritterhoff,

Thanks for the great work on this project.

I have discovered a bug related to the parsing of dates returned by the Sectigo API. The API may return a null date in the ListByPersonEmail response if the certificate was rejected. In this case the parsing of the JSONDate will fail.

Request: https://cert-manager.com/api/smime/v2/byPersonEmail/[email protected]
Response:

{
  "id": <redacted>,
  "state": "rejected",
  "certificateDetails": {},
  "serialNumber": "",
  "orderNumber": 0,
  "backendCertId": null,
  "expires": null
}

Location: https://github.com/hm-edu/sectigo-client/blob/main/sectigo/misc/date.go#L17

Error log:

{
  "level":"error",
  "ts":"2023-08-09T08:12:13.051Z",
  "caller":"zap/options.go:212",
  "msg":"finished unary call with code Internal",
  "grpc.start_time":"2023-08-09T08:12:12Z",
  "system":"grpc",
  "span.kind":"server",
  "grpc.service":"pkiService.SmimeService",
  "grpc.method":"ListCertificates",
  "error":"rpc error: code = Internal desc = parsing time \"null\" as \"2006-01-02\": cannot parse \"null\" as \"2006\"",
  "grpc.code":"Internal",
  "grpc.time_ms":830.216,
  "stacktrace":"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap.DefaultMessageProducer\n\t/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/logging/zap/options.go:212\ngithub.com/grpc-ecosystem/go-grpc-middleware/logging/zap.UnaryServerInterceptor.func1\n\t/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/logging/zap/server_interceptors.go:39\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func2.1\n\t/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:48\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.UnaryServerInterceptor.func1\n\t/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/[email protected]/interceptor.go:344\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func2.1\n\t/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:48\ngithub.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1\n\t/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/recovery/interceptors.go:33\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func2\n\t/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:53\ngithub.com/hm-edu/portal-apis._SmimeService_ListCertificates_Handler\n\t/go/pkg/mod/github.com/hm-edu/[email protected]/pki_grpc.pb.go:324\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1360\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1737\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.1\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:982"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.