Giter VIP home page Giter VIP logo

certcenter's Introduction

Certcenter

Ruby API to order (free so called AlwaysOnSSL domain validated) certificates from Certcenter AG.

WARNING: Do not use the certificate service from Certcenter AG! Unless you are willing to change your code all the time to get it working again, because they change the api without letting you know about it! They do not understand that breaking changes need to be done by increasing the api-version! And if you tell them, they do not even care about it.You should better use Let’s Encrypt.

Installation

Add this line to your application's Gemfile:

gem 'certcenter'

And then execute:

bundle

Or install it yourself as:

gem install certcenter

Usage

require 'certcenter'

common_name  = "example.com"
organization = "Example Inc."
country      = "US"
state_name   = "California"
locality     = "San Francisco"
domain_list  = ["www.example.com","mail.example.com"] # note: not for AlwaysOnSSL certs!
oauth_token  = "XYZXYZXYZXYZXYZXYZXYZ.oauth2.certcenter.com"

cr = Certcenter.new(common_name, organization, country, state_name, locality, domain_list, oauth_token)

if cr.valid?

  # Returns an array like:
  # [ "cname.example.com.", "orig.example.com."]
  cname = cr.dns_data
  
  # Now create a CNAME entry for order approval
  # cname.example.com. IN CNAME orig.example.com.
  
  # Order the signed certificate
  if cr.order
    puts [cr.key, cr.intermediate, cr.crt]
  end
end

License

The gem is available as open source under the terms of the MIT License.

Copyright

Copyright (c) 2016 Stefan Husch, qutic development

certcenter's People

Contributors

jfqd avatar

Watchers

 avatar  avatar  avatar  avatar

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.