dongjia_ritm 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a153a707f90726c604a8ee1d7f4b5c8b56b46bdfbe5508b3eaa73ccd83c4e752
4
- data.tar.gz: db8814c5492caafa00c56334520c24eba69efc81d5e85482cc1479ca6ac71ffe
3
+ metadata.gz: f972609ff8dd46aa60b383f9d01d51d278e381fb0afc7d25e38841b34649cd3b
4
+ data.tar.gz: 6f19bd40c81e17f69a997396e15485ac9810208a11ab325f8f04acdce08b7c00
5
5
  SHA512:
6
- metadata.gz: 66da915d817a478faaa7e7551ef1a9e7f0798a5bccd980d7e593b9143511d444f9bb19ca2d6474f929767abc3d2b4ed3bb1a65ffe51f092d8e4b8ee73b721bd7
7
- data.tar.gz: fa0b5609a8c211da90b70748b70a301577200993d842c9ca753ad3a8c52bc1a00f133db7f57abcb0f5ff327fdb3402fe23fb7dcfbd11c1a6916d70c72003e35f
6
+ metadata.gz: 9b703ee81a4c29459d0c078b5301d9d2297c10f44caff632dcfebf25a2c3eee560b2a6a96f49285717db39c340565cc0f2591123286d3ff9ad0d3a890a108818
7
+ data.tar.gz: 150e5b93c86e7d6a9e9dd220255d306a607ff3b28173f9f49bee1b539569d9aea69cfd95301a76f713e68f9a294e90bf7629a55bcde317d814defed30716f282
@@ -16,9 +16,10 @@ module Ritm
16
16
  def self.create(common_name, serial_number: nil)
17
17
  cert = CertificateAuthority::Certificate.new
18
18
  cert.subject.common_name = common_name
19
- cert.subject.organization = cert.subject.organizational_unit = 'RubyInTheMiddle'
20
- cert.subject.country = 'AR'
21
- cert.not_before = cert.not_before - 3600 * 24 * 30 # Substract 30 days
19
+ cert.subject.organization = cert.subject.organizational_unit = 'dongjia'
20
+ cert.subject.country = 'CN'
21
+ cert.not_before = Time.now - 7 * 24 * 60 * 60 # 7 days before
22
+ cert.not_after = cert.not_before + 397 * 24 * 60 * 60 # 397 days
22
23
  cert.serial_number.number = serial_number || common_name.hash.abs
23
24
  cert.key_material.generate_key(2048)
24
25
  yield cert if block_given?
@@ -1,3 +1,3 @@
1
1
  module Ritm
2
- VERSION = '1.0.4'.freeze
2
+ VERSION = '1.0.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dongjia_ritm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - dongjia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-18 00:00:00.000000000 Z
11
+ date: 2020-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: certificate_authority