jruby-openssl 0.7.5.dev → 0.7.5

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.
Files changed (93) hide show
  1. data/History.txt +44 -14
  2. data/Manifest.txt +135 -80
  3. data/Rakefile +14 -6
  4. data/lib/{openssl.rb → 1.8/openssl.rb} +2 -11
  5. data/lib/{openssl → 1.8/openssl}/bn.rb +2 -2
  6. data/lib/{openssl → 1.8/openssl}/buffering.rb +3 -1
  7. data/lib/{openssl → 1.8/openssl}/cipher.rb +0 -0
  8. data/lib/{openssl → 1.8/openssl}/config.rb +1 -1
  9. data/lib/{openssl → 1.8/openssl}/digest.rb +2 -2
  10. data/lib/{openssl → 1.8/openssl}/pkcs7.rb +0 -0
  11. data/lib/{openssl/ssl.rb → 1.8/openssl/ssl-internal.rb} +2 -2
  12. data/lib/1.8/openssl/ssl.rb +1 -0
  13. data/lib/{openssl/x509.rb → 1.8/openssl/x509-internal.rb} +8 -9
  14. data/lib/1.8/openssl/x509.rb +1 -0
  15. data/lib/1.9/openssl.rb +22 -0
  16. data/lib/1.9/openssl/bn.rb +35 -0
  17. data/lib/1.9/openssl/buffering.rb +448 -0
  18. data/lib/1.9/openssl/cipher.rb +65 -0
  19. data/lib/1.9/openssl/config.rb +313 -0
  20. data/lib/1.9/openssl/digest.rb +72 -0
  21. data/lib/1.9/openssl/ssl-internal.rb +177 -0
  22. data/lib/1.9/openssl/ssl.rb +2 -0
  23. data/lib/1.9/openssl/x509-internal.rb +158 -0
  24. data/lib/1.9/openssl/x509.rb +2 -0
  25. data/lib/{jopenssl.jar → shared/jopenssl.jar} +0 -0
  26. data/lib/{jopenssl → shared/jopenssl}/version.rb +1 -1
  27. data/lib/shared/openssl.rb +18 -0
  28. data/lib/{openssl → shared/openssl}/dummy.rb +0 -0
  29. data/lib/{openssl → shared/openssl}/dummyssl.rb +0 -0
  30. data/lib/shared/openssl/ssl.rb +1 -0
  31. data/lib/shared/openssl/x509.rb +1 -0
  32. data/test/{openssl → 1.8}/ssl_server.rb +0 -0
  33. data/test/{openssl → 1.8}/test_asn1.rb +15 -0
  34. data/test/{openssl → 1.8}/test_cipher.rb +0 -0
  35. data/test/{openssl → 1.8}/test_config.rb +0 -0
  36. data/test/{openssl → 1.8}/test_digest.rb +0 -0
  37. data/test/{openssl → 1.8}/test_ec.rb +0 -0
  38. data/test/{openssl → 1.8}/test_hmac.rb +0 -0
  39. data/test/{openssl → 1.8}/test_ns_spki.rb +0 -0
  40. data/test/{openssl → 1.8}/test_pair.rb +10 -2
  41. data/test/{openssl → 1.8}/test_pkcs7.rb +0 -0
  42. data/test/{openssl → 1.8}/test_pkey_rsa.rb +0 -0
  43. data/test/{openssl → 1.8}/test_ssl.rb +17 -20
  44. data/test/{openssl → 1.8}/test_x509cert.rb +0 -0
  45. data/test/{openssl → 1.8}/test_x509crl.rb +0 -0
  46. data/test/{openssl → 1.8}/test_x509ext.rb +0 -0
  47. data/test/{openssl → 1.8}/test_x509name.rb +0 -0
  48. data/test/{openssl → 1.8}/test_x509req.rb +0 -0
  49. data/test/{openssl → 1.8}/test_x509store.rb +0 -0
  50. data/test/{openssl → 1.8}/utils.rb +0 -0
  51. data/test/1.9/ssl_server.rb +81 -0
  52. data/test/1.9/test_asn1.rb +589 -0
  53. data/test/1.9/test_bn.rb +23 -0
  54. data/test/1.9/test_buffering.rb +88 -0
  55. data/test/1.9/test_cipher.rb +107 -0
  56. data/test/1.9/test_config.rb +288 -0
  57. data/test/1.9/test_digest.rb +118 -0
  58. data/test/1.9/test_engine.rb +15 -0
  59. data/test/1.9/test_hmac.rb +32 -0
  60. data/test/1.9/test_ns_spki.rb +50 -0
  61. data/test/1.9/test_ocsp.rb +47 -0
  62. data/test/1.9/test_pair.rb +257 -0
  63. data/test/1.9/test_pkcs12.rb +209 -0
  64. data/test/1.9/test_pkcs7.rb +151 -0
  65. data/test/1.9/test_pkey_dh.rb +72 -0
  66. data/test/1.9/test_pkey_dsa.rb +224 -0
  67. data/test/1.9/test_pkey_ec.rb +182 -0
  68. data/test/1.9/test_pkey_rsa.rb +244 -0
  69. data/test/1.9/test_ssl.rb +455 -0
  70. data/test/1.9/test_ssl_session.rb +327 -0
  71. data/test/1.9/test_x509cert.rb +217 -0
  72. data/test/1.9/test_x509crl.rb +221 -0
  73. data/test/1.9/test_x509ext.rb +69 -0
  74. data/test/1.9/test_x509name.rb +296 -0
  75. data/test/1.9/test_x509req.rb +150 -0
  76. data/test/1.9/test_x509store.rb +229 -0
  77. data/test/1.9/utils.rb +304 -0
  78. data/test/fixture/purpose/ca/ca_config.rb +1 -1
  79. data/test/fixture/purpose/ca/gen_cert.rb +128 -0
  80. data/test/fixture/purpose/ca/newcerts/4_cert.pem +19 -0
  81. data/test/fixture/purpose/ca/serial +1 -1
  82. data/test/fixture/purpose/sslserver_no_dsig_in_keyUsage.pem +19 -0
  83. data/test/ruby/envutil.rb +208 -0
  84. data/test/ruby/ut_eof.rb +128 -0
  85. data/test/test_java.rb +1 -1
  86. data/test/test_openssl.rb +1 -1
  87. data/test/test_pkcs7.rb +16 -0
  88. data/test/test_pkey_dsa.rb +180 -0
  89. data/test/test_pkey_rsa.rb +298 -0
  90. data/test/test_ssl.rb +1 -1
  91. data/test/test_x509store.rb +8 -0
  92. metadata +121 -75
  93. data/test/test_pkey.rb +0 -204
@@ -1,6 +1,21 @@
1
+ == 0.7.5
2
+
3
+ This release improved 1.9 mode support with help of
4
+ Duncan Mak <duncan@earthaid.net>. Now jruby-ossl gem includes both 1.8 and 1.9
5
+ libraries and part of features should work fine on 1.9 mode, too.
6
+
7
+ - JRUBY-6270: Wrong keyUsage check for SSL server
8
+ - JRUBY-6260: OpenSSL::ASN1::Integer#value incompatibility
9
+ - JRUBY-6044: Improve Ecrypted RSA/DSA pem support
10
+ - JRUBY-5972: Allow to load/dump empty PKCS7 data
11
+ - JRUBY-5833: Fix X509Name handling; X509Name RDN can include multiple elements
12
+ - JRUBY-5362: Improved 1.9 support
13
+ - JRUBY-4992: Warn if loaded by non JRuby interpreter
14
+
1
15
  == 0.7.4
2
16
 
3
- - JRUBY-5519: Avoid String encoding dependency in DER loading. PEM loading failed on JRuby 1.6.x. Fixed.
17
+ - JRUBY-5519: Avoid String encoding dependency in DER loading. PEM loading
18
+ failed on JRuby 1.6.x. Fixed.
4
19
  - JRUBY-5510: Add debug information to released jar
5
20
  - JRUBY-5478: Update bouncycastle jars to the latest version. (1.46)
6
21
 
@@ -59,18 +74,22 @@
59
74
  -- JRUBY-4342: Follow ruby-openssl of CRuby 1.8.7.
60
75
  -- JRUBY-4346: Sync tests with tests for ruby-openssl of CRuby 1.8.7.
61
76
  -- JRUBY-4444: OpenSSL crash running RubyGems tests
62
- -- JRUBY-4075: Net::SSH gives OpenSSL::Cipher::CipherError "No message available"
77
+ -- JRUBY-4075: Net::SSH gives OpenSSL::Cipher::CipherError "No message
78
+ available"
63
79
  -- JRUBY-4076: Net::SSH padding error using 3des-cbc on Solaris
64
80
  -- JRUBY-4541: jruby-openssl doesn't load on App Engine.
65
81
  -- JRUBY-4077: Net::SSH "all authorization methods failed" Solaris -> Solaris
66
82
  -- JRUBY-4535: Issues with the BouncyCastle provider
67
83
  -- JRUBY-4510: JRuby-OpenSSL crashes when JCE fails a initialise bcprov
68
- -- JRUBY-4343: Update BouncyCastle jar to upstream version; jdk14-139 -> jdk15-144
84
+ -- JRUBY-4343: Update BouncyCastle jar to upstream version; jdk14-139 ->
85
+ jdk15-144
69
86
  - Cipher issues
70
- -- JRUBY-4012: Initialization vector length handled differently than in MRI (longer IV sequence are trimmed to fit the required)
87
+ -- JRUBY-4012: Initialization vector length handled differently than in MRI
88
+ (longer IV sequence are trimmed to fit the required)
71
89
  -- JRUBY-4473: Implemented DSA key generation
72
90
  -- JRUBY-4472: Cipher does not support RC4 and CAST
73
- -- JRUBY-4577: InvalidParameterException 'Wrong keysize: must be equal to 112 or 168' for DES3 + SunJCE
91
+ -- JRUBY-4577: InvalidParameterException 'Wrong keysize: must be equal to 112 or
92
+ 168' for DES3 + SunJCE
74
93
  - SSL and X.509(PKIX) issues
75
94
  -- JRUBY-4384: TCP socket connection causes busy loop of SSL server
76
95
  -- JRUBY-4370: Implement SSLContext#ciphers
@@ -80,16 +99,23 @@
80
99
  -- JRUBY-4684: SSLContext#verify_depth is ignored
81
100
  -- JRUBY-4398: SSLContext#options does not affect to SSL sessions
82
101
  -- JRUBY-4360: Implement SSLSocket#verify_result and dependents
83
- -- JRUBY-3829: SSLSocket#read should clear given buffer before concatenating (ByteBuffer.java:328:in `allocate': java.lang.IllegalArgumentException when returning SOAP queries over a certain size)
84
- -- JRUBY-4686: SSLSocket can drop last chunk of data just before inbound channel close
102
+ -- JRUBY-3829: SSLSocket#read should clear given buffer before concatenating
103
+ (ByteBuffer.java:328:in `allocate': java.lang.IllegalArgumentException when
104
+ returning SOAP queries over a certain size)
105
+ -- JRUBY-4686: SSLSocket can drop last chunk of data just before inbound channel
106
+ close
85
107
  -- JRUBY-4369: X509Store#verify_callback is not called
86
- -- JRUBY-4409: OpenSSL::X509::Store#add_file corrupts when it includes certificates which have the same subject (problem with ruby-openid-apps-discovery (github jruby-openssl issue #2))
108
+ -- JRUBY-4409: OpenSSL::X509::Store#add_file corrupts when it includes
109
+ certificates which have the same subject (problem with
110
+ ruby-openid-apps-discovery (github jruby-openssl issue #2))
87
111
  -- JRUBY-4333: PKCS#8 formatted privkey read
88
112
  -- JRUBY-4454: Loading Key file as a Certificate causes NPE
89
- -- JRUBY-4455: calling X509::Certificate#sign for the Certificate initialized from PEM causes IllegalStateException
113
+ -- JRUBY-4455: calling X509::Certificate#sign for the Certificate initialized
114
+ from PEM causes IllegalStateException
90
115
  - PKCS#7 issues
91
116
  -- JRUBY-4379: PKCS7#sign failed for DES3 cipher algorithm
92
- -- JRUBY-4428: Allow to use DES-EDE3-CBC in PKCS#7 w/o the Policy Files (rake test doesn't finish on JDK5 w/o policy files update)
117
+ -- JRUBY-4428: Allow to use DES-EDE3-CBC in PKCS#7 w/o the Policy Files (rake
118
+ test doesn't finish on JDK5 w/o policy files update)
93
119
  - Misc
94
120
  -- JRUBY-4574: jruby-openssl deprecation warning cleanup
95
121
  -- JRUBY-4591: jruby-1.4 support
@@ -132,21 +158,25 @@
132
158
 
133
159
  == 0.5.1
134
160
 
135
- * Multiple fixes by Brice Figureau to get net/ssh working. Requires JRuby 1.3.1 to be 100%
161
+ * Multiple fixes by Brice Figureau to get net/ssh working. Requires JRuby 1.3.1
162
+ to be 100%
136
163
  * Fix by Frederic Jean for a character-decoding issue for some certificates
137
164
 
138
165
  == 0.5
139
166
 
140
167
  * Fixed JRUBY-3614: Unsupported HMAC algorithm (HMACSHA-256)
141
- * Fixed JRUBY-3570: ActiveMerchant's AuthorizeNet Gateway throws OpenSSL Cert Validation Error, when there should be no error
168
+ * Fixed JRUBY-3570: ActiveMerchant's AuthorizeNet Gateway throws OpenSSL Cert
169
+ Validation Error, when there should be no error
142
170
  * Fixed JRUBY-3557 Class cast exception in PKeyRSA.java
143
171
  * Fixed JRUBY-3468 X.509 certificates: subjectKeyIdentifier corrupted
144
- * Fixed JRUBY-3285 Unsupported HMAC algorithm (HMACSHA1) error when generating digest
172
+ * Fixed JRUBY-3285 Unsupported HMAC algorithm (HMACSHA1) error when generating
173
+ digest
145
174
  * Misc code cleanup
146
175
 
147
176
  == 0.2
148
177
 
149
- - Enable remaining tests; fix a nil string issue in SSLSocket.sysread (JRUBY-1888)
178
+ - Enable remaining tests; fix a nil string issue in SSLSocket.sysread
179
+ (JRUBY-1888)
150
180
  - Fix socket buffering issue by setting socket IO sync = true
151
181
  - Fix bad file descriptor issue caused by unnecessary close (JRUBY-2152)
152
182
  - Fix AES key length (JRUBY-2187)
@@ -3,114 +3,169 @@ History.txt
3
3
  Manifest.txt
4
4
  README.txt
5
5
  License.txt
6
- lib/jopenssl.jar
7
- lib/openssl
8
- lib/jopenssl
9
- lib/jopenssl.jar
10
- lib/openssl.rb
11
- lib/openssl/dummy.rb
12
- lib/openssl/dummyssl.rb
13
- lib/openssl/config.rb
14
- lib/openssl/cipher.rb
15
- lib/openssl/ssl.rb
16
- lib/openssl/bn.rb
17
- lib/openssl/x509.rb
18
- lib/openssl/digest.rb
19
- lib/openssl/buffering.rb
20
- lib/openssl/pkcs7.rb
21
- lib/jopenssl/version.rb
22
- test/test_imaps.rb
6
+ lib/shared/jopenssl.jar
7
+ lib/1.9
8
+ lib/shared
9
+ lib/1.8
10
+ lib/1.9/openssl.rb
11
+ lib/1.9/openssl
12
+ lib/1.9/openssl/bn.rb
13
+ lib/1.9/openssl/x509-internal.rb
14
+ lib/1.9/openssl/cipher.rb
15
+ lib/1.9/openssl/digest.rb
16
+ lib/1.9/openssl/ssl.rb
17
+ lib/1.9/openssl/buffering.rb
18
+ lib/1.9/openssl/ssl-internal.rb
19
+ lib/1.9/openssl/x509.rb
20
+ lib/1.9/openssl/config.rb
21
+ lib/shared/jopenssl.jar
22
+ lib/shared/openssl.rb
23
+ lib/shared/openssl
24
+ lib/shared/jopenssl
25
+ lib/shared/openssl/dummyssl.rb
26
+ lib/shared/openssl/ssl.rb
27
+ lib/shared/openssl/x509.rb
28
+ lib/shared/openssl/dummy.rb
29
+ lib/shared/jopenssl/version.rb
30
+ lib/1.8/openssl.rb
31
+ lib/1.8/openssl
32
+ lib/1.8/openssl/bn.rb
33
+ lib/1.8/openssl/pkcs7.rb
34
+ lib/1.8/openssl/x509-internal.rb
35
+ lib/1.8/openssl/cipher.rb
36
+ lib/1.8/openssl/digest.rb
37
+ lib/1.8/openssl/ssl.rb
38
+ lib/1.8/openssl/buffering.rb
39
+ lib/1.8/openssl/ssl-internal.rb
40
+ lib/1.8/openssl/x509.rb
41
+ lib/1.8/openssl/config.rb
42
+ test/1.9
43
+ test/ref
23
44
  test/test_all.rb
45
+ test/test_pkey_dsa.rb
46
+ test/fixture
24
47
  test/test_integration.rb
25
- test/ut_eof.rb
26
- test/openssl
27
- test/test_java.rb
48
+ test/ruby
49
+ test/test_ssl.rb
50
+ test/test_parse_certificate.rb
28
51
  test/test_openssl.rb
29
- test/test_pkey.rb
30
- test/ref
31
- test/test_cipher.rb
32
52
  test/cert_with_ec_pk.cer
33
- test/fixture
34
- test/test_pkcs7.rb
53
+ test/java
54
+ test/ut_eof.rb
35
55
  test/test_x509store.rb
56
+ test/test_imaps.rb
36
57
  test/test_certificate.rb
37
- test/test_parse_certificate.rb
38
- test/test_ssl.rb
39
- test/java
40
- test/openssl/test_x509name.rb
41
- test/openssl/test_ns_spki.rb
42
- test/openssl/test_x509cert.rb
43
- test/openssl/ssl_server.rb
44
- test/openssl/test_pair.rb
45
- test/openssl/test_ec.rb
46
- test/openssl/test_config.rb
47
- test/openssl/utils.rb
48
- test/openssl/test_x509req.rb
49
- test/openssl/test_cipher.rb
50
- test/openssl/test_digest.rb
51
- test/openssl/test_x509ext.rb
52
- test/openssl/test_asn1.rb
53
- test/openssl/test_pkcs7.rb
54
- test/openssl/test_x509store.rb
55
- test/openssl/test_pkey_rsa.rb
56
- test/openssl/test_ssl.rb
57
- test/openssl/test_x509crl.rb
58
- test/openssl/test_hmac.rb
59
- test/ref/compile.rb
58
+ test/test_pkcs7.rb
59
+ test/test_cipher.rb
60
+ test/1.8
61
+ test/test_pkey_rsa.rb
62
+ test/test_java.rb
63
+ test/1.9/test_ssl_session.rb
64
+ test/1.9/test_engine.rb
65
+ test/1.9/test_asn1.rb
66
+ test/1.9/test_pkey_dh.rb
67
+ test/1.9/test_pkey_dsa.rb
68
+ test/1.9/test_ocsp.rb
69
+ test/1.9/ssl_server.rb
70
+ test/1.9/test_x509ext.rb
71
+ test/1.9/utils.rb
72
+ test/1.9/test_ssl.rb
73
+ test/1.9/test_buffering.rb
74
+ test/1.9/test_ns_spki.rb
75
+ test/1.9/test_digest.rb
76
+ test/1.9/test_pair.rb
77
+ test/1.9/test_x509crl.rb
78
+ test/1.9/test_x509store.rb
79
+ test/1.9/test_bn.rb
80
+ test/1.9/test_pkey_ec.rb
81
+ test/1.9/test_pkcs7.rb
82
+ test/1.9/test_pkcs12.rb
83
+ test/1.9/test_cipher.rb
84
+ test/1.9/test_pkey_rsa.rb
85
+ test/1.9/test_x509req.rb
86
+ test/1.9/test_x509name.rb
87
+ test/1.9/test_hmac.rb
88
+ test/1.9/test_x509cert.rb
89
+ test/1.9/test_config.rb
60
90
  test/ref/a.out
61
91
  test/ref/pkcs1
62
92
  test/ref/pkcs1.c
63
- test/fixture/cacert.pem
64
- test/fixture/ca-bundle.crt
93
+ test/ref/compile.rb
65
94
  test/fixture/common.pem
95
+ test/fixture/ca_path
66
96
  test/fixture/key_then_cert.pem
97
+ test/fixture/imaps
98
+ test/fixture/keypair.pem
99
+ test/fixture/cacert.pem
67
100
  test/fixture/verisign.pem
101
+ test/fixture/purpose
68
102
  test/fixture/cert_localhost.pem
69
- test/fixture/localhost_keypair.pem
70
- test/fixture/verisign_c3.pem
71
103
  test/fixture/selfcert.pem
72
- test/fixture/ids_in_subject_rdn_set.pem
73
104
  test/fixture/max.pem
74
- test/fixture/keypair.pem
75
- test/fixture/purpose
76
- test/fixture/imaps
77
- test/fixture/ca_path
78
- test/fixture/purpose/cacert.pem
79
- test/fixture/purpose/sslclient
80
- test/fixture/purpose/b70a5bc1.0
105
+ test/fixture/localhost_keypair.pem
106
+ test/fixture/ids_in_subject_rdn_set.pem
107
+ test/fixture/ca-bundle.crt
108
+ test/fixture/verisign_c3.pem
109
+ test/fixture/ca_path/72fa7371.0
110
+ test/fixture/ca_path/verisign.pem
111
+ test/fixture/imaps/cacert.pem
112
+ test/fixture/imaps/server.crt
113
+ test/fixture/imaps/server.key
81
114
  test/fixture/purpose/ca
82
- test/fixture/purpose/sslclient.pem
83
- test/fixture/purpose/sslserver.pem
115
+ test/fixture/purpose/sslclient
84
116
  test/fixture/purpose/scripts
117
+ test/fixture/purpose/sslserver_no_dsig_in_keyUsage.pem
118
+ test/fixture/purpose/cacert.pem
85
119
  test/fixture/purpose/sslserver
86
- test/fixture/purpose/sslclient/sslclient.pem
87
- test/fixture/purpose/sslclient/csr.pem
88
- test/fixture/purpose/sslclient/keypair.pem
89
- test/fixture/purpose/ca/cacert.pem
90
- test/fixture/purpose/ca/newcerts
120
+ test/fixture/purpose/sslserver.pem
121
+ test/fixture/purpose/sslclient.pem
122
+ test/fixture/purpose/b70a5bc1.0
123
+ test/fixture/purpose/ca/serial
124
+ test/fixture/purpose/ca/gen_cert.rb
91
125
  test/fixture/purpose/ca/PASSWD_OF_CA_KEY_IS_1234
92
126
  test/fixture/purpose/ca/ca_config.rb
93
- test/fixture/purpose/ca/serial
127
+ test/fixture/purpose/ca/cacert.pem
94
128
  test/fixture/purpose/ca/private
95
- test/fixture/purpose/ca/newcerts/2_cert.pem
96
- test/fixture/purpose/ca/newcerts/3_cert.pem
129
+ test/fixture/purpose/ca/newcerts
97
130
  test/fixture/purpose/ca/private/cakeypair.pem
131
+ test/fixture/purpose/ca/newcerts/4_cert.pem
132
+ test/fixture/purpose/ca/newcerts/3_cert.pem
133
+ test/fixture/purpose/ca/newcerts/2_cert.pem
134
+ test/fixture/purpose/sslclient/csr.pem
135
+ test/fixture/purpose/sslclient/keypair.pem
136
+ test/fixture/purpose/sslclient/sslclient.pem
98
137
  test/fixture/purpose/scripts/gen_cert.rb
99
138
  test/fixture/purpose/scripts/init_ca.rb
100
139
  test/fixture/purpose/scripts/gen_csr.rb
101
- test/fixture/purpose/sslserver/sslserver.pem
102
140
  test/fixture/purpose/sslserver/csr.pem
103
141
  test/fixture/purpose/sslserver/keypair.pem
104
- test/fixture/imaps/cacert.pem
105
- test/fixture/imaps/server.crt
106
- test/fixture/imaps/server.key
107
- test/fixture/ca_path/verisign.pem
108
- test/fixture/ca_path/72fa7371.0
142
+ test/fixture/purpose/sslserver/sslserver.pem
143
+ test/ruby/ut_eof.rb
144
+ test/ruby/envutil.rb
109
145
  test/java/pkcs7_mime_enveloped.message
110
- test/java/pkcs7_mime_signed.message
146
+ test/java/test_java_attribute.rb
111
147
  test/java/test_java_pkcs7.rb
112
- test/java/test_java_bio.rb
113
- test/java/pkcs7_multipart_signed.message
114
148
  test/java/test_java_mime.rb
115
- test/java/test_java_attribute.rb
149
+ test/java/pkcs7_mime_signed.message
116
150
  test/java/test_java_smime.rb
151
+ test/java/pkcs7_multipart_signed.message
152
+ test/java/test_java_bio.rb
153
+ test/1.8/test_asn1.rb
154
+ test/1.8/ssl_server.rb
155
+ test/1.8/test_x509ext.rb
156
+ test/1.8/utils.rb
157
+ test/1.8/test_ssl.rb
158
+ test/1.8/test_ec.rb
159
+ test/1.8/test_ns_spki.rb
160
+ test/1.8/test_digest.rb
161
+ test/1.8/test_pair.rb
162
+ test/1.8/test_x509crl.rb
163
+ test/1.8/test_x509store.rb
164
+ test/1.8/test_pkcs7.rb
165
+ test/1.8/test_cipher.rb
166
+ test/1.8/test_pkey_rsa.rb
167
+ test/1.8/test_x509req.rb
168
+ test/1.8/test_x509name.rb
169
+ test/1.8/test_hmac.rb
170
+ test/1.8/test_x509cert.rb
171
+ test/1.8/test_config.rb
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
3
 
4
- MANIFEST = FileList["Rakefile", "History.txt", "Manifest.txt", "README.txt", "License.txt", "lib/jopenssl.jar", "lib/**/*", "test/**/*"]
4
+ MANIFEST = FileList["Rakefile", "History.txt", "Manifest.txt", "README.txt", "License.txt", "lib/shared/jopenssl.jar", "lib/**/*", "test/**/*"]
5
5
  BC_JARS = FileList["build_lib/bc*.jar"]
6
6
 
7
7
  task :default => [:java_compile, :test]
@@ -38,23 +38,29 @@ task :java_compile do
38
38
  end
39
39
 
40
40
  sh "javac @pkg/compile_options @pkg/compile_classpath @pkg/compile_sourcefiles"
41
- sh "jar cf lib/jopenssl.jar -C pkg/classes/ ."
41
+ sh "jar cf lib/shared/jopenssl.jar -C pkg/classes/ ."
42
42
  end
43
- file "lib/jopenssl.jar" => :java_compile
43
+ file "lib/shared/jopenssl.jar" => :java_compile
44
44
 
45
45
  task :more_clean do
46
- rm_f FileList['lib/jopenssl.jar']
46
+ rm_f FileList['lib/shared/jopenssl.jar']
47
47
  end
48
48
  task :clean => :more_clean
49
49
 
50
50
  File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f.puts n } }
51
51
 
52
52
  begin
53
+ # easiest way to configure ruby_flags for Hoe.
54
+ ENV['RUBY_FLAGS'] ||= [
55
+ (RUBY_VERSION >= '1.9.0' ? '--1.9' : '--1.8'),
56
+ '-w',
57
+ '-Ibuild_lib:lib/shared:lib:test',
58
+ ENV['RUBY_DEBUG']
59
+ ].compact.join(' ')
53
60
  require 'hoe'
54
61
  Hoe.plugin :gemcutter
55
- Hoe.add_include_dirs('build_lib')
56
62
  hoe = Hoe.spec("jruby-openssl") do |p|
57
- load File.dirname(__FILE__) + "/lib/jopenssl/version.rb"
63
+ load File.dirname(__FILE__) + "/lib/shared/jopenssl/version.rb"
58
64
  p.version = Jopenssl::Version::VERSION
59
65
  p.rubyforge_name = "jruby-extras"
60
66
  p.url = "http://jruby-extras.rubyforge.org/jruby-openssl"
@@ -67,6 +73,8 @@ begin
67
73
  p.extra_deps << ['bouncy-castle-java', '>= 1.5.0146.1']
68
74
  end
69
75
  hoe.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
76
+ # Either lib/1.8 or lib/1.9 is added to $LOAD_PATH dynamically.
77
+ hoe.spec.require_paths = ['lib/shared']
70
78
 
71
79
  task :gemspec do
72
80
  File.open("#{hoe.name}.gemspec", "w") {|f| f << hoe.spec.to_ruby }
@@ -58,19 +58,10 @@ unless defined?(::Digest::Class)
58
58
  end
59
59
  # end of compat chunk.
60
60
 
61
- begin
62
- require 'bouncy-castle-java'
63
- rescue LoadError
64
- # runs under restricted mode.
65
- end
66
- require 'jopenssl'
67
-
68
-
69
61
  require 'openssl/bn'
70
62
  require 'openssl/cipher'
71
63
  require 'openssl/config'
72
64
  require 'openssl/digest'
73
65
  require 'openssl/pkcs7'
74
- require 'openssl/ssl'
75
- require 'openssl/x509'
76
-
66
+ require 'openssl/ssl-internal'
67
+ require 'openssl/x509-internal'
@@ -11,7 +11,7 @@
11
11
  (See the file 'LICENCE'.)
12
12
 
13
13
  = Version
14
- $Id: bn.rb 11708 2007-02-12 23:01:19Z shyouhei $
14
+ $Id: bn.rb 31657 2011-05-20 22:25:35Z shyouhei $
15
15
  =end
16
16
 
17
17
  ##
@@ -29,7 +29,7 @@ end # OpenSSL
29
29
  #
30
30
  class Integer
31
31
  def to_bn
32
- OpenSSL::BN::new(self)
32
+ OpenSSL::BN::new(self.to_s(16), 16)
33
33
  end
34
34
  end # Integer
35
35