certmagic | Automatic HTTPS for any Go program | TLS library

 by   caddyserver Go Version: v0.18.0 License: Apache-2.0

kandi X-RAY | certmagic Summary

kandi X-RAY | certmagic Summary

certmagic is a Go library typically used in Security, TLS applications. certmagic has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

This library uses Let’s Encrypt by default, but you can use any certificate authority that conforms to the ACME specification. Known/common CAs are provided as consts in the package, for example LetsEncryptStagingCA and LetsEncryptProductionCA. The certmagic.Config struct is how you can wield the power of this fully armed and operational battle station. However, an empty/uninitialized Config is not a valid one! In time, you will learn to use the force of certmagic.NewDefault() as I have. The default Config value is called certmagic.Default. Change its fields to suit your needs, then call certmagic.NewDefault() when you need a valid Config value. In other words, certmagic.Default is a template and is not valid for use directly. You can set the default values easily, for example: certmagic.Default.Issuer = …​. Similarly, to configure ACME-specific defaults, use certmagic.DefaultACME. The high-level functions in this package (HTTPS(), Listen(), ManageSync(), and ManageAsync()) use the default config exclusively. This is how most of you will interact with the package. This is suitable when all your certificates are managed the same way. However, if you need to manage certificates differently depending on their name, you will need to make your own cache and configs (keep reading). Although not strictly required, this is highly recommended best practice. It allows you to receive expiration emails if your certificates are expiring for some reason, and also allows the CA’s engineers to potentially get in touch with you if something is wrong. I recommend setting certmagic.DefaultACME.Email or always setting the Email field of a new Config struct. To avoid firehosing the CA’s servers, CertMagic has built-in rate limiting. Currently, its default limit is up to 10 transactions (obtain or renew) every 1 minute (sliding window). This can be changed by setting the RateLimitEvents and RateLimitEventsWindow variables, if desired. The CA may still enforce their own rate limits, and there’s nothing (well, nothing ethical) CertMagic can do to bypass them for you. Additionally, CertMagic will retry failed validations with exponential backoff for up to 30 days, with a reasonable maximum interval between attempts (an "attempt" means trying each enabled challenge type once).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              certmagic has a medium active ecosystem.
              It has 4526 star(s) with 258 fork(s). There are 60 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 11 open issues and 137 have been closed. On average issues are closed in 64 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of certmagic is v0.18.0

            kandi-Quality Quality

              certmagic has 0 bugs and 0 code smells.

            kandi-Security Security

              certmagic has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              certmagic code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              certmagic is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              certmagic releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 6045 lines of code, 268 functions and 31 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of certmagic
            Get all kandi verified functions for this library.

            certmagic Key Features

            No Key Features are available at this moment for certmagic.

            certmagic Examples and Code Snippets

            No Code Snippets are available at this moment for certmagic.

            Community Discussions

            QUESTION

            Caddy Server Certmagic - invalid memory address
            Asked 2021-Jul-10 at 07:59

            I'm trying to setup a server using certmagic but every time I run the code I just get the below stack message, everywhere i have looked online says you just need to do certmagic.HTTPS([]string{"my-domain.com"}, router) but there must be something missing here?

            ...

            ANSWER

            Answered 2021-Jun-20 at 21:13

            This is a known bug in certmagic which has already been fixed and merged.

            You can see the details here: https://github.com/caddyserver/certmagic/pull/135

            They seem to release pretty often, so can either wait a few days for the new release, or use the main branch instead of v0.14.0, meanwhile.

            Source https://stackoverflow.com/questions/68055349

            QUESTION

            Need help automating TLS Cert Handling in Go
            Asked 2020-Jun-21 at 08:26

            I have a simple Go webserver and I want it to use TLS certificates. I know certbot, the python application, and used it frequently so far, but I would like to pretty much automate everything. That's where I stumbled upon https://github.com/caddyserver/certmagic, which is pretty awesome. However, I cannot seem to wrap my head around using it in conjunction with a custom server struct.

            ...

            ANSWER

            Answered 2020-Jun-21 at 08:26

            The docs here suggest to use Listen() instead of HTTPS() to make use of your own http.Server values.

            Source https://stackoverflow.com/questions/62493073

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install certmagic

            You can download it from GitHub.

            Support

            We welcome your contributions! Please see our [contributing guidelines](https://github.com/caddyserver/certmagic/blob/master/.github/CONTRIBUTING.md) for instructions.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/caddyserver/certmagic.git

          • CLI

            gh repo clone caddyserver/certmagic

          • sshUrl

            git@github.com:caddyserver/certmagic.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular TLS Libraries

            mkcert

            by FiloSottile

            v2rayN

            by 2dust

            acme.sh

            by acmesh-official

            nginxconfig.io

            by digitalocean

            v2ray

            by 233boy

            Try Top Libraries by caddyserver

            caddy

            by caddyserverGo

            examples

            by caddyserverCSS

            xcaddy

            by caddyserverGo

            forwardproxy

            by caddyserverGo

            ingress

            by caddyserverGo