krypt 0.0.2.rc1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 30b370a608db6282de81d662b2db509b063ddc88
4
- data.tar.gz: 37443d86f9ef7fbaf1458d35f9d8df69de258d62
3
+ metadata.gz: d72bad3f24cda8f50e58fce8748f91240ac933fe
4
+ data.tar.gz: 842fa1c8b22c602ac71417a68df6a633e0853024
5
5
  SHA512:
6
- metadata.gz: c84ae1f12244e091658b5e4edcf502cf31c75c3126f3f982d5569c52d79f8f333c2e8a69fe606e6dc99d6c7f5095377607ce7c6f021418183e852ecf20875f14
7
- data.tar.gz: 82e764512b1871163de9d4888b0f3e40415666555465752ff698888ccc2eb208e60e15ae2964329e7d1ed2830ebf20611e5ed0620db3c4eacb3e99bd62633d47
6
+ metadata.gz: a979d067c0ebf9fd1a1b4a879fe0393d44ee87fc266a341ad09d7baf9c45031ba14046d57fc082e9a8885ed4159c9f92594d0dd4e028f505bd3d86588347774b
7
+ data.tar.gz: e709896599b290e0c28ca68ec08c4226550dd3fb82f5af5210d5bcfef1166fa22b984904edcd78f548ca07bfe9234b1319680d701de481ddaf6c44b83e913b39
@@ -1,2 +1,26 @@
1
1
  require_relative 'provider/provider'
2
- require_relative 'provider/ffi'
2
+
3
+ ##
4
+ # If JRuby is configured with native API access disabled, requiring the FFI
5
+ # provider will result in a LoadError. The FFI provider is not required at
6
+ # runtime as there is always a default (Java-based) provider.
7
+ #
8
+
9
+ def java?
10
+ !! (RUBY_PLATFORM =~ /java/)
11
+ end
12
+
13
+ def native_disabled?
14
+ require 'jruby'
15
+ !JRuby.runtime.instance_config.native_enabled
16
+ end
17
+
18
+ begin
19
+ require_relative 'provider/ffi'
20
+ rescue LoadError => e
21
+ if java? && native_disabled?
22
+ # Do not use the FFI provider with JRuby and native API access disabled
23
+ else
24
+ raise e
25
+ end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module Krypt
2
- VERSION = "0.0.2.rc1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,151 +1,150 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: krypt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.rc1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Nakamura, Martin Bosslet
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-23 00:00:00.000000000 Z
11
+ date: 2014-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
15
- requirement: !ruby/object:Gem::Requirement
15
+ version_requirements: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
20
+ requirement: !ruby/object:Gem::Requirement
23
21
  requirements:
24
- - - ">="
22
+ - - '>='
25
23
  - !ruby/object:Gem::Version
26
24
  version: '0'
25
+ prerelease: false
26
+ type: :runtime
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: krypt-core
29
- requirement: !ruby/object:Gem::Requirement
29
+ version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.2.rc1
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
33
+ version: 0.0.2
34
+ requirement: !ruby/object:Gem::Requirement
37
35
  requirements:
38
36
  - - '='
39
37
  - !ruby/object:Gem::Version
40
- version: 0.0.2.rc1
41
- description: krypt provides a unified framework for Ruby cryptography by offering
42
- a platform- and library-independent provider mechanism.
38
+ version: 0.0.2
39
+ prerelease: false
40
+ type: :runtime
41
+ description: krypt provides a unified framework for Ruby cryptography by offering a platform- and library-independent provider mechanism.
43
42
  email: Martin.Bosslet@gmail.com
44
43
  executables: []
45
44
  extensions: []
46
45
  extra_rdoc_files:
47
46
  - README.md
48
47
  files:
49
- - LICENSE
50
- - README.md
48
+ - lib/krypt_missing.rb
51
49
  - lib/krypt.rb
50
+ - lib/krypt/provider.rb
51
+ - lib/krypt/x509.rb
52
+ - lib/krypt/pkcs5.rb
52
53
  - lib/krypt/asn1.rb
53
- - lib/krypt/asn1/common.rb
54
- - lib/krypt/asn1/template.rb
54
+ - lib/krypt/digest.rb
55
55
  - lib/krypt/codec.rb
56
- - lib/krypt/codec/base64.rb
56
+ - lib/krypt/version.rb
57
+ - lib/krypt/ossl.rb
58
+ - lib/krypt/hmac.rb
57
59
  - lib/krypt/codec/base_codec.rb
58
60
  - lib/krypt/codec/hex.rb
59
- - lib/krypt/digest.rb
60
- - lib/krypt/hmac.rb
61
- - lib/krypt/ossl.rb
62
- - lib/krypt/ossl/pkcs5.rb
63
- - lib/krypt/pkcs5.rb
61
+ - lib/krypt/codec/base64.rb
64
62
  - lib/krypt/pkcs5/pbkdf2.rb
65
- - lib/krypt/provider.rb
63
+ - lib/krypt/asn1/common.rb
64
+ - lib/krypt/asn1/template.rb
65
+ - lib/krypt/x509/common.rb
66
+ - lib/krypt/x509/crl.rb
67
+ - lib/krypt/x509/certificate.rb
68
+ - lib/krypt/provider/provider.rb
66
69
  - lib/krypt/provider/ffi.rb
67
- - lib/krypt/provider/ffi/digest.rb
68
- - lib/krypt/provider/ffi/ffi_helper.rb
69
70
  - lib/krypt/provider/ffi/provider.rb
71
+ - lib/krypt/provider/ffi/ffi_helper.rb
72
+ - lib/krypt/provider/ffi/digest.rb
70
73
  - lib/krypt/provider/ffi/provider_api.rb
71
- - lib/krypt/provider/provider.rb
72
- - lib/krypt/version.rb
73
- - lib/krypt/x509.rb
74
- - lib/krypt/x509/certificate.rb
75
- - lib/krypt/x509/common.rb
76
- - lib/krypt/x509/crl.rb
77
- - lib/krypt_missing.rb
74
+ - lib/krypt/ossl/pkcs5.rb
75
+ - spec/resources.rb
78
76
  - spec/krypt-core/MEMO.txt
79
- - spec/krypt-core/asn1/asn1_bit_string_spec.rb
80
- - spec/krypt-core/asn1/asn1_boolean_spec.rb
81
- - spec/krypt-core/asn1/asn1_constants_spec.rb
82
- - spec/krypt-core/asn1/asn1_data_spec.rb
83
- - spec/krypt-core/asn1/asn1_end_of_contents_spec.rb
84
- - spec/krypt-core/asn1/asn1_enumerated_spec.rb
85
- - spec/krypt-core/asn1/asn1_generalized_time_spec.rb
77
+ - spec/krypt-core/resources.rb
78
+ - spec/krypt-core/template/template_seq_parse_spec.rb
79
+ - spec/krypt-core/template/template_dsl_spec.rb
80
+ - spec/krypt-core/template/template_choice_parse_spec.rb
81
+ - spec/krypt-core/template/template_seq_of_parse_spec.rb
82
+ - spec/krypt-core/base64/base64_spec.rb
86
83
  - spec/krypt-core/asn1/asn1_integer_spec.rb
84
+ - spec/krypt-core/asn1/asn1_octet_string_spec.rb
87
85
  - spec/krypt-core/asn1/asn1_null_spec.rb
86
+ - spec/krypt-core/asn1/asn1_set_spec.rb
88
87
  - spec/krypt-core/asn1/asn1_object_id_spec.rb
89
- - spec/krypt-core/asn1/asn1_octet_string_spec.rb
90
- - spec/krypt-core/asn1/asn1_parser_spec.rb
91
- - spec/krypt-core/asn1/asn1_pem_spec.rb
88
+ - spec/krypt-core/asn1/asn1_end_of_contents_spec.rb
89
+ - spec/krypt-core/asn1/asn1_data_spec.rb
90
+ - spec/krypt-core/asn1/resources.rb
91
+ - spec/krypt-core/asn1/asn1_boolean_spec.rb
92
92
  - spec/krypt-core/asn1/asn1_sequence_spec.rb
93
- - spec/krypt-core/asn1/asn1_set_spec.rb
93
+ - spec/krypt-core/asn1/asn1_generalized_time_spec.rb
94
94
  - spec/krypt-core/asn1/asn1_utc_time_spec.rb
95
+ - spec/krypt-core/asn1/asn1_constants_spec.rb
96
+ - spec/krypt-core/asn1/asn1_pem_spec.rb
97
+ - spec/krypt-core/asn1/asn1_enumerated_spec.rb
98
+ - spec/krypt-core/asn1/asn1_bit_string_spec.rb
95
99
  - spec/krypt-core/asn1/asn1_utf8_string_spec.rb
96
- - spec/krypt-core/asn1/resources.rb
97
- - spec/krypt-core/base64/base64_spec.rb
100
+ - spec/krypt-core/asn1/asn1_parser_spec.rb
98
101
  - spec/krypt-core/digest/digest_spec.rb
99
- - spec/krypt-core/hex/hex_spec.rb
100
102
  - spec/krypt-core/pem/pem_decode_spec.rb
101
- - spec/krypt-core/resources.rb
102
- - spec/krypt-core/template/template_choice_parse_spec.rb
103
- - spec/krypt-core/template/template_dsl_spec.rb
104
- - spec/krypt-core/template/template_seq_of_parse_spec.rb
105
- - spec/krypt-core/template/template_seq_parse_spec.rb
106
- - spec/krypt/codec/base64_decoder_spec.rb
103
+ - spec/krypt-core/hex/hex_spec.rb
104
+ - spec/res/ca-bundle.crt
105
+ - spec/res/certificate.pem
106
+ - spec/res/certificate.cer
107
+ - spec/res/multiple_certs.pem
108
+ - spec/krypt/hmac/hmac_spec.rb
107
109
  - spec/krypt/codec/base64_encoder_spec.rb
108
110
  - spec/krypt/codec/base64_mixed_spec.rb
111
+ - spec/krypt/codec/base64_decoder_spec.rb
112
+ - spec/krypt/codec/identity_shared.rb
109
113
  - spec/krypt/codec/hex_decoder_spec.rb
110
- - spec/krypt/codec/hex_encoder_spec.rb
111
114
  - spec/krypt/codec/hex_mixed_spec.rb
112
- - spec/krypt/codec/identity_shared.rb
113
- - spec/krypt/hmac/hmac_spec.rb
115
+ - spec/krypt/codec/hex_encoder_spec.rb
114
116
  - spec/krypt/pkcs5/pbkdf2_spec.rb
115
117
  - spec/krypt/provider/provider_spec.rb
116
- - spec/res/ca-bundle.crt
117
- - spec/res/certificate.cer
118
- - spec/res/certificate.pem
119
- - spec/res/multiple_certs.pem
120
- - spec/resources.rb
121
- - test/helper.rb
122
- - test/res/certificate.cer
123
118
  - test/resources.rb
124
119
  - test/scratch.rb
125
120
  - test/test_krypt_asn1.rb
126
121
  - test/test_krypt_parser.rb
122
+ - test/helper.rb
123
+ - test/res/certificate.cer
124
+ - LICENSE
125
+ - README.md
127
126
  homepage: https://github.com/krypt/krypt
128
127
  licenses:
129
128
  - MIT
130
129
  metadata: {}
131
- post_install_message:
130
+ post_install_message:
132
131
  rdoc_options: []
133
132
  require_paths:
134
133
  - lib
135
134
  required_ruby_version: !ruby/object:Gem::Requirement
136
135
  requirements:
137
- - - ">="
136
+ - - '>='
138
137
  - !ruby/object:Gem::Version
139
138
  version: 1.9.3
140
139
  required_rubygems_version: !ruby/object:Gem::Requirement
141
140
  requirements:
142
- - - ">"
141
+ - - '>='
143
142
  - !ruby/object:Gem::Version
144
- version: 1.3.1
143
+ version: '0'
145
144
  requirements: []
146
- rubyforge_project:
147
- rubygems_version: 2.2.0
148
- signing_key:
145
+ rubyforge_project:
146
+ rubygems_version: 2.1.9
147
+ signing_key:
149
148
  specification_version: 4
150
149
  summary: Platform- and library-independent cryptography for Ruby
151
150
  test_files: