openssl-additions 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdd8e73590f05d365f26e89266bf5d407577b107c97b28bd5f85c072cfa87ce0
4
- data.tar.gz: 9647f4f6f32b983dbf3a1afad9f0ab55c3dd63b53533ee10f9e65e08f77d7336
3
+ metadata.gz: 7c4f3a73e293460574c4664cfc46ec88225f98b56af7cb815f1c8884edac28b6
4
+ data.tar.gz: f12ee14c668926658e218b6f8607e1eb77237df4e0ed6e3fac2f4037051b67b6
5
5
  SHA512:
6
- metadata.gz: e187e3ed9f3405625530259d820d562728e5470ae9b02ef059a0fdbcb474eb9ff5a362efbc9a736c6d5386f74961fc7787cb583720600341298199d01edb7b61
7
- data.tar.gz: ca604e9d75b36ebd670ceb63a2bd15cc858c55d4fa2184b915cf20ecd88dddc2fc4e4e172a68f4231e62daf7204948a58dd441cf5a432721e238d37d91168748
6
+ metadata.gz: 1af236619dc0e4afb0453327afbddb5b0f814bc0d5ec68e713b2f0b85a638720ec2884002c9e8285d07328c760553f4bcdfffcaebf41f3f166b1c23b99884b06
7
+ data.tar.gz: 676caa68cf512bd522175302b7ea6576ac87411ee3b69e9935a1b3dde396fd3ddac660648c29f1d355429dc7bb1e095674b47892f7f1b954ceae15d57c379b02
data/README.md CHANGED
@@ -56,6 +56,20 @@ until recently, but once I did, I wrote this.
56
56
  key.private? # => false
57
57
 
58
58
 
59
+ ## Parsing SSH keys
60
+
61
+ The `OpenSSL::PKey.from_ssh_key` method can take an OpenSSH public or private
62
+ key and spit out the appropriate subclass of `OpenSSL::PKey::PKey`.
63
+
64
+
65
+ ## YAML Serialization
66
+
67
+ If you've ever tried to call `.to_yaml` on an `OpenSSL::X509::Certificate`,
68
+ you'll have noticed that it doesn't contain anything very useful. Well,
69
+ if you `require "openssl/yaml_serialization"`, you'll get properly serialized
70
+ certificates (and keys, and some number of other data types).
71
+
72
+
59
73
  # Contributing
60
74
 
61
75
  See `CONTRIBUTING.md`.
@@ -0,0 +1,22 @@
1
+ require "openssl"
2
+
3
+ class OpenSSL::X509::Certificate
4
+ def encode_with(coder)
5
+ coder['der'] = self.to_der
6
+ end
7
+
8
+ def init_with(coder)
9
+ self.__send__(:initialize, coder['der'])
10
+ end
11
+ end
12
+
13
+ class OpenSSL::PKey::PKey
14
+ def encode_with(coder)
15
+ coder['der'] = self.to_der
16
+ end
17
+
18
+ def init_with(coder)
19
+ self.__send__(:initialize, coder['der'])
20
+ end
21
+ end
22
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openssl-additions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Palmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-25 00:00:00.000000000 Z
11
+ date: 2019-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -171,6 +171,7 @@ files:
171
171
  - lib/openssl/x509/certificate.rb
172
172
  - lib/openssl/x509/request.rb
173
173
  - lib/openssl/x509/spki.rb
174
+ - lib/openssl/yaml_serialization.rb
174
175
  - openssl-additions.gemspec
175
176
  homepage: https://github.com/pwnedkeys/openssl-additions
176
177
  licenses: []