Permalink
Browse files

Merge branch 'jruby-1_7' into master

Conflicts:
	core/pom.xml
	core/src/main/java/org/jruby/RubyInstanceConfig.java
	docs/man/pom.xml
	docs/pom.xml
	ext/openssl/lib/jopenssl18/openssl/bn.rb
	ext/openssl/lib/jopenssl18/openssl/buffering.rb
	ext/openssl/lib/jopenssl18/openssl/cipher.rb
	ext/openssl/lib/jopenssl18/openssl/config.rb
	ext/openssl/lib/jopenssl18/openssl/digest.rb
	ext/openssl/lib/jopenssl18/openssl/pkcs7.rb
	ext/openssl/lib/jopenssl18/openssl/ssl-internal.rb
	ext/openssl/lib/jopenssl18/openssl/ssl.rb
	ext/openssl/lib/jopenssl18/openssl/x509-internal.rb
	ext/openssl/lib/jopenssl18/openssl/x509.rb
	ext/openssl/lib/jopenssl19/openssl.rb
	ext/openssl/lib/jopenssl19/openssl/bn.rb
	ext/openssl/lib/jopenssl19/openssl/cipher.rb
	ext/openssl/lib/jopenssl19/openssl/digest.rb
	ext/openssl/lib/jopenssl19/openssl/ssl-internal.rb
	ext/openssl/lib/jopenssl19/openssl/ssl.rb
	ext/openssl/lib/jopenssl19/openssl/x509-internal.rb
	ext/openssl/lib/jopenssl19/openssl/x509.rb
	ext/openssl/lib/jopenssl21/openssl.rb
	ext/openssl/lib/jopenssl21/openssl/bn.rb
	ext/openssl/lib/jopenssl21/openssl/buffering.rb
	ext/openssl/lib/jopenssl21/openssl/config.rb
	ext/openssl/lib/jopenssl21/openssl/digest.rb
	ext/openssl/lib/jopenssl21/openssl/ssl.rb
	ext/openssl/lib/openssl/bn.rb
	ext/openssl/lib/openssl/buffering.rb
	ext/openssl/lib/openssl/cipher.rb
	ext/openssl/lib/openssl/config.rb
	ext/openssl/lib/openssl/digest.rb
	ext/openssl/lib/openssl/pkcs7.rb
	ext/openssl/lib/openssl/ssl-internal.rb
	ext/openssl/lib/openssl/ssl.rb
	ext/openssl/lib/openssl/x509-internal.rb
	ext/openssl/lib/openssl/x509.rb
	ext/openssl/pom.xml
	ext/openssl/src/main/java/org/jruby/ext/openssl/ASN1.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/Attribute.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/BN.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/BouncyCastlePEMHandler.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/Cipher.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/Digest.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/HMAC.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/NetscapeSPKI.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/OSSLLibrary.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/OpenSSLImpl.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/OpenSSLReal.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/PEMHandler.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/PKCS7.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/PKey.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/PKeyDH.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/PKeyDSA.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/PKeyRSA.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/Random.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/Request.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/SSL.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/SSLContext.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/SSLSocket.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/Utils.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/X509.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/X509CRL.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/X509Cert.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/X509Extensions.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/X509Name.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/X509Revoked.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/X509Store.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/X509StoreCtx.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/impl/ASN1Registry.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/impl/EVP.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/impl/Envelope.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKCS10Request.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKCS7.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKey.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/impl/RecipInfo.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/impl/SMIME.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/impl/Signed.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/impl/SignerInfoWithPkey.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Certificate.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Function0.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Function1.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Function2.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Function3.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Function4.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Function5.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Lookup.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/LookupMethod.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Name.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/PEMInputOutput.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Purpose.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Store.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/StoreContext.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/Trust.java
	ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/X509AuxCertificate.java
	ext/pom.xml
	ext/readline/pom.xml
	ext/ripper/pom.xml
	lib/pom.rb
	lib/pom.xml
	lib/ruby/1.9/date.rb
	maven/jruby-complete/pom.xml
	maven/jruby-dist/pom.xml
	maven/jruby-jars/pom.xml
	maven/jruby-jars/src/it/helloworld/pom.xml
	maven/jruby-noasm/pom.xml
	maven/jruby-rake-plugin/pom.xml
	maven/jruby-stdlib/pom.xml
	maven/jruby/pom.xml
	maven/pom.xml
	pom.xml
	spec/ffi/managed_struct_spec.rb
	spec/ffi/spec_helper.rb
	spec/regression/gh-801_date_inspect_spec.rb
	test/externals/ruby1.9/openssl/test_integration.rb
	test/externals/ruby1.9/openssl/test_x509cert.rb
	test/pom.xml
  • Loading branch information...
mkristian committed Jul 1, 2014
2 parents ae0ac44 + 6a65d0f commit 207df03ff51a2af3d6006134fff5235e046889c9
Showing with 240 additions and 8,388 deletions.
  1. +4 −0 .gitignore
  2. +1 −1 core/src/main/java/org/jruby/RubyInstanceConfig.java
  3. +8 −2 core/src/main/java/org/jruby/java/addons/KernelJavaAddons.java
  4. +4 −0 docs/man/pom.xml
  5. +31 −0 docs/pom.xml
  6. +0 −1,856 ext/openssl/src/main/java/org/jruby/ext/openssl/CipherStrings.java
  7. +0 −49 ext/openssl/src/main/java/org/jruby/ext/openssl/Config.java
  8. +0 −44 ext/openssl/src/main/java/org/jruby/ext/openssl/DefaultPEMHandler.java
  9. +0 −53 ext/openssl/src/main/java/org/jruby/ext/openssl/SimpleSecretKey.java
  10. +0 −88 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/Attribute.java
  11. +0 −345 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/BIO.java
  12. +0 −38 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/BIOFilter.java
  13. +0 −2,066 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/Base64.java
  14. +0 −74 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/Base64BIOFilter.java
  15. +0 −158 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/CipherBIOFilter.java
  16. +0 −78 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/CipherSpec.java
  17. +0 −126 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/Digest.java
  18. +0 −187 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/EncContent.java
  19. +0 −77 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/Encrypt.java
  20. +0 −35 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/IssuerAndSerial.java
  21. +0 −117 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/MemBIO.java
  22. +0 −76 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/MessageDigestBIOFilter.java
  23. +0 −244 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/Mime.java
  24. +0 −113 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/MimeHeader.java
  25. +0 −80 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/MimeParam.java
  26. +0 −40 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/NotVerifiedPKCS7Exception.java
  27. +0 −52 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/NullSinkBIO.java
  28. +0 −165 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKCS7Data.java
  29. +0 −91 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKCS7DataData.java
  30. +0 −64 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKCS7DataDigest.java
  31. +0 −61 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKCS7DataEncrypted.java
  32. +0 −88 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKCS7DataEnveloped.java
  33. +0 −133 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKCS7DataSigned.java
  34. +0 −97 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKCS7DataSignedAndEnveloped.java
  35. +0 −70 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/PKCS7Exception.java
  36. +0 −200 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/SignEnvelope.java
  37. +0 −34 ext/openssl/src/main/java/org/jruby/ext/openssl/impl/TypeDiscriminating.java
  38. +0 −59 ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/CRL.java
  39. +0 −46 ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/CertificateFile.java
  40. +0 −46 ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/CertificateHashDir.java
  41. +0 −41 ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/PKey.java
  42. +0 −36 ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/PolicyTree.java
  43. +0 −324 ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/VerifyParameter.java
  44. +0 −43 ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/X509Aux.java
  45. +0 −131 ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/X509Error.java
  46. +0 −88 ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/X509Object.java
  47. +0 −536 ext/openssl/src/main/java/org/jruby/ext/openssl/x509store/X509Utils.java
  48. +8 −1 ext/pom.xml
  49. +12 −0 ext/readline/pom.xml
  50. +13 −0 ext/ripper/pom.xml
  51. +1 −1 lib/ruby/2.1/date.rb
  52. +29 −1 lib/ruby/shared/jruby/compiler/java_class.rb
  53. +1 −1 maven/gems/pom.xml
  54. +2 −1 maven/jruby-complete/pom.rb
  55. +8 −7 maven/jruby-complete/src/it/helloworld/pom.xml
  56. +5 −0 maven/jruby-complete/src/it/helloworld/verify.bsh
  57. +1 −1 maven/jruby-core-complete/pom.xml
  58. +2 −1 maven/jruby-jars/pom.xml
  59. +1 −0 maven/jruby-jars/src/it/helloworld/pom.xml
  60. +5 −0 maven/jruby-jars/src/it/helloworld/verify.bsh
  61. +2 −1 maven/jruby-noasm/src/it/helloworld/pom.xml
  62. +5 −0 maven/jruby-noasm/src/it/helloworld/verify.bsh
  63. +4 −0 maven/jruby-rake-plugin/pom.xml
  64. +1 −1 maven/jruby-stdlib-complete/pom.xml
  65. +1 −0 maven/jruby/src/it/helloworld/pom.xml
  66. +5 −0 maven/jruby/src/it/helloworld/verify.bsh
  67. +58 −0 spec/java_integration/jrubyc/java/field_spec.rb
  68. +0 −11 spec/regression/GH-1695_bigdecimal_and_rational_multiplication_rounds_the_rational_number.rb
  69. +17 −0 spec/regression/GH-1745_datetime_jd_spec.rb
  70. +1 −1 spec/regression/gh-801_date_inspect_spec.rb
  71. +8 −6 spec/regression/stringio_set_encoding_changes_shared_bytelist_spec.rb
  72. +2 −2 test/pom.xml
View
@@ -19,6 +19,10 @@ lib/native
lib/jni
lib/ruby/gems
lib/ruby/shared/rubygems/defaults/jruby_native.rb
+lib/ruby/shared/krypt*
+lib/ruby/shared/jopenssl*
+lib/ruby/shared/org/
+lib/ruby/shared/openssl
nbproject/private
share
latest_source_cache
@@ -215,7 +215,7 @@ private void eatToShebang(InputStream in) {
try {
do {
if (isShebang(cursor)) break;
- } while (skipToNextLine(cursor));
+ } while (skipToNextLine(cursor));
} catch (IOException e) {
} finally {
try { cursor.finish(); } catch (IOException e) {}
@@ -32,7 +32,7 @@ public static IRubyObject rbRaise(ThreadContext context, IRubyObject recv, IRuby
if (exception != null) {
// looks like someone's trying to raise a Java exception. Let them.
Object maybeThrowable = exception.getObject();
-
+
if (maybeThrowable instanceof Throwable) {
// yes, we're cheating here.
Helpers.throwException((Throwable)maybeThrowable);
@@ -53,7 +53,7 @@ public static IRubyObject to_java(ThreadContext context, IRubyObject fromObject)
return Java.getInstance(context.runtime, fromObject.toJava(Object.class));
}
}
-
+
@JRubyMethod
public static IRubyObject to_java(ThreadContext context, IRubyObject fromObject, IRubyObject type) {
if (type.isNil()) {
@@ -106,6 +106,12 @@ public static IRubyObject java_package(IRubyObject recv, IRubyObject[] args) {
return recv.getRuntime().getNil();
}
+ @JRubyMethod(rest = true)
+ public static IRubyObject java_field(IRubyObject recv, IRubyObject[] args) {
+ // empty stub for now
+ return recv.getRuntime().getNil();
+ }
+
private static JavaClass getTargetType(ThreadContext context, Ruby runtime, IRubyObject type) {
JavaClass targetType;
View
@@ -9,7 +9,11 @@
<parent>
<groupId>org.jruby</groupId>
<artifactId>docs</artifactId>
+<<<<<<< HEAD
<version>9000.dev</version>
+=======
+ <version>1.7.14-SNAPSHOT</version>
+>>>>>>> jruby-1_7
</parent>
<groupId>org.jruby</groupId>
View
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jruby</groupId>
+ <artifactId>jruby-parent</artifactId>
+ <version>1.7.14-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.jruby</groupId>
+ <artifactId>docs</artifactId>
+ <packaging>pom</packaging>
+
+ <name>JRuby Docs</name>
+
+ <scm>
+ <connection>scm:git:git://kenai.com/jruby~main/docs</connection>
+ <developerConnection>scm:git:ssh://git.kenai.com/jruby~main/docs</developerConnection>
+ <url>http://kenai.com/projects/jruby/sources</url>
+ </scm>
+
+ <modules>
+ <module>man</module>
+ </modules>
+
+</project>

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,49 +0,0 @@
-/***** BEGIN LICENSE BLOCK *****
- * Version: EPL 1.0/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Eclipse Public
- * License Version 1.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.eclipse.org/legal/epl-v10.html
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * Copyright (C) 2006 Ola Bini <ola@ologix.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the EPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the EPL, the GPL or the LGPL.
- ***** END LICENSE BLOCK *****/
-package org.jruby.ext.openssl;
-
-import org.jruby.Ruby;
-import org.jruby.RubyClass;
-import org.jruby.RubyModule;
-
-/**
- * @author <a href="mailto:ola.bini@ki.se">Ola Bini</a>
- */
-public class Config {
- // TODO: we cannot detect OS's default config file. ignore?
- public static final String DEFAULT_CONFIG_FILE = "./openssl.cnf";
-
- public static void createConfig(Ruby runtime, RubyModule mOSSL) {
- RubyClass cConfig = mOSSL.defineClassUnder("Config", runtime.getObject(), runtime.getObject().getAllocator());
- cConfig.defineAnnotatedMethods(Config.class);
- RubyClass openSSLError = mOSSL.getClass("OpenSSLError");
- mOSSL.defineClassUnder("ConfigError", openSSLError, openSSLError.getAllocator());
- // TODO: we should define this constant with proper path. (see above)
- //cConfig.setConstant("DEFAULT_CONFIG_FILE", runtime.newString(DEFAULT_CONFIG_FILE));
- }
-}// Config
@@ -1,44 +0,0 @@
-/***** BEGIN LICENSE BLOCK *****
- * Version: EPL 1.0/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Eclipse Public
- * License Version 1.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.eclipse.org/legal/epl-v10.html
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * Copyright (C) 2006 Ola Bini <ola@ologix.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the EPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the EPL, the GPL or the LGPL.
- ***** END LICENSE BLOCK *****/
-package org.jruby.ext.openssl;
-
-import java.io.Reader;
-import java.io.Writer;
-
-/**
- * @author <a href="mailto:ola.bini@ki.se">Ola Bini</a>
- */
-public class DefaultPEMHandler implements PEMHandler {
- public Object readPEM(Reader read, String password) {
- return null;
- }
- public void writePEM(Writer writ, Object obj, String algorithm, char[] password) {
- }
- public void writePEM(Writer writ, Object obj) {
- }
-}// DefaultPEMHandler
@@ -1,53 +0,0 @@
-/***** BEGIN LICENSE BLOCK *****
- * Version: EPL 1.0/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Eclipse Public
- * License Version 1.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.eclipse.org/legal/epl-v10.html
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * Copyright (C) 2006 Ola Bini <ola@ologix.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the EPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the EPL, the GPL or the LGPL.
- ***** END LICENSE BLOCK *****/
-package org.jruby.ext.openssl;
-
-import javax.crypto.SecretKey;
-
-/**
- * @author <a href="mailto:ola.bini@ki.se">Ola Bini</a>
- */
-public class SimpleSecretKey implements SecretKey {
- private static final long serialVersionUID = 1L;
-
- private final String algorithm;
- private final byte[] value;
- public SimpleSecretKey(String algorithm, byte[] value) {
- this.algorithm = algorithm;
- this.value = value;
- }
- public String getAlgorithm() {
- return algorithm;
- }
- public byte[] getEncoded() {
- return value;
- }
- public String getFormat() {
- return "RAW";
- }
-}// SimpleSecretKey
@@ -1,88 +0,0 @@
-/***** BEGIN LICENSE BLOCK *****
- * Version: EPL 1.0/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Eclipse Public
- * License Version 1.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.eclipse.org/legal/epl-v10.html
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * Copyright (C) 2008 Ola Bini <ola.bini@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the EPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the EPL, the GPL or the LGPL.
- ***** END LICENSE BLOCK *****/
-package org.jruby.ext.openssl.impl;
-
-import org.bouncycastle.asn1.ASN1Encodable;
-import java.util.List;
-import java.util.ArrayList;
-
-/** X509_ATTRIBUTE
- *
- * @author <a href="mailto:ola.bini@gmail.com">Ola Bini</a>
- */
-public class Attribute {
- private int type;
- private boolean single;
- private List<ASN1Encodable> set;
-
- private Attribute() {}
-
- public static Attribute create(int nid, int atrtype, ASN1Encodable value) {
- Attribute ret = new Attribute();
-
- ret.type = nid;
- ret.single = false;
- ret.set = new ArrayList<ASN1Encodable>();
- ret.set.add(value);
-
- return ret;
- }
-
- public int getType() {
- return type;
- }
-
- public List<ASN1Encodable> getSet() {
- return set;
- }
-
- public boolean isSingle() {
- return this.single;
- }
-
- @Override
- public boolean equals(Object obj) {
- boolean ret = this == obj;
- if(!ret && (obj instanceof Attribute)) {
- Attribute attr2 = (Attribute)obj;
- ret =
- this.type == attr2.type &&
- this.set.equals(attr2.set);
- }
- return ret;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((set == null) ? 0 : set.hashCode());
- result = prime * result + type;
- return result;
- }
-}// Attribute
Oops, something went wrong.

0 comments on commit 207df03

Please sign in to comment.