Skip to content

Commit

Permalink
Merge pull request #14 from redBorder/development
Browse files Browse the repository at this point in the history
Release 1.0.1
  • Loading branch information
manegron authored Jul 25, 2024
2 parents a15837a + 1f6627e commit 1114911
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cookbook-nginx CHANGELOG
===============

## 1.0.1

- Miguel Alvarez
- [dfbf9d0] generate random 128 bit serial

## 1.0.0

- malvads
Expand Down
3 changes: 2 additions & 1 deletion resources/libraries/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ module Helper
require 'openssl'
require 'resolv'
require 'base64'
require 'securerandom'

def create_cert(cn)
# Return a hash with private key and certificate in x509 format
key = OpenSSL::PKey::RSA.new 4096
name = OpenSSL::X509::Name.parse "CN=#{cn}/DC=redborder"
cert = OpenSSL::X509::Certificate.new
cert.version = 2
cert.serial = 0
cert.serial = SecureRandom.random_number(2**128)
cert.not_before = Time.now
cert.not_after = Time.now + (3600 * 24 * 365 * 10)
cert.public_key = key.public_key
Expand Down
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
maintainer_email '[email protected]'
license 'AGPL-3.0'
description 'Installs/Configures cookbook-nginx'
version '1.0.0'
version '1.0.1'

0 comments on commit 1114911

Please sign in to comment.