<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,7 +23,7 @@ end
 desc &quot;Compile the native Java code.&quot;
 task :java_compile do
   mkdir_p &quot;pkg/classes&quot;
-  sh &quot;javac -target 1.4 -source 1.4 -d pkg/classes #{java_classpath_arg} #{FileList['src/java/**/*.java'].join(' ')}&quot;
+  sh &quot;javac -target 1.5 -source 1.5 -d pkg/classes #{java_classpath_arg} #{FileList['src/java/**/*.java'].join(' ')}&quot;
   File.open(&quot;pkg/classes/manifest.mf&quot;, &quot;w&quot;) {|f| f.puts &quot;Class-Path: #{BC_JARS.map{|f| File.basename(f) }.join(' ')}&quot;}
   sh &quot;jar cfm lib/jopenssl.jar pkg/classes/manifest.mf -C pkg/classes/ .&quot;
 end</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -9,8 +9,8 @@
   &lt;property name=&quot;target.classes.test&quot; value=&quot;${target}/test-classes&quot;/&gt;
   &lt;property name=&quot;lib.dir&quot; value=&quot;lib&quot;/&gt;
   &lt;property name=&quot;jruby.jar&quot; value=&quot;${jruby.home}/lib/jruby.jar&quot;/&gt;
-  &lt;property name=&quot;version.source&quot; value=&quot;1.4&quot;/&gt;
-  &lt;property name=&quot;version.target&quot; value=&quot;1.4&quot;/&gt;
+  &lt;property name=&quot;version.source&quot; value=&quot;1.5&quot;/&gt;
+  &lt;property name=&quot;version.target&quot; value=&quot;1.5&quot;/&gt;
 
   &lt;path id=&quot;build.classpath&quot;&gt;
     &lt;fileset dir=&quot;${lib.dir}&quot; includes=&quot;*.jar&quot; excludes=&quot;jopenssl.jar,jruby.jar&quot;/&gt;</diff>
      <filename>build.xml</filename>
    </modified>
    <modified>
      <diff>@@ -43,6 +43,7 @@ import org.jruby.RubyModule;
 import org.jruby.RubyNumeric;
 import org.jruby.RubyObject;
 import org.jruby.RubyString;
+import org.jruby.common.IRubyWarnings;
 import org.jruby.exceptions.RaiseException;
 import org.jruby.runtime.Block;
 import org.jruby.runtime.CallbackFactory;
@@ -334,6 +335,13 @@ public class Cipher extends RubyObject {
         if(keyBytes.length &lt; keyLen) {
             throw new RaiseException(getRuntime(), ciphErr, &quot;key length to short&quot;, true);
         }
+
+        if(keyBytes.length &gt; keyLen) {
+            byte[] keys = new byte[keyLen];
+            System.arraycopy(keyBytes, 0, keys, 0, keyLen);
+            keyBytes = keys;
+        }
+
         this.key = keyBytes;
         return key;
     }
@@ -499,7 +507,7 @@ public class Cipher extends RubyObject {
     }
 
     public IRubyObject update_deprecated(IRubyObject data) {
-        getRuntime().getWarnings().warn(&quot;&quot; + this.getMetaClass().getRealClass().getName() + &quot;#&lt;&lt; is deprecated; use &quot; + this.getMetaClass().getRealClass().getName() + &quot;#update instead&quot;);
+        getRuntime().getWarnings().warn(IRubyWarnings.ID.DEPRECATED_METHOD, &quot;&quot; + this.getMetaClass().getRealClass().getName() + &quot;#&lt;&lt; is deprecated; use &quot; + this.getMetaClass().getRealClass().getName() + &quot;#update instead&quot;);
         return update(data);
     }
 </diff>
      <filename>src/java/org/jruby/ext/openssl/Cipher.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>63e8881fcf4f84c0a567510d47e6ab92c64f9793</id>
    </parent>
  </parents>
  <author>
    <name>olabini</name>
    <email>olabini@8ba958d5-0c1a-0410-94a6-a65dfc1b28a6</email>
  </author>
  <url>http://github.com/jruby/jruby-openssl/commit/04a5971b6727c8c22f1e8fb87bfcadaa02f7e384</url>
  <id>04a5971b6727c8c22f1e8fb87bfcadaa02f7e384</id>
  <committed-date>2008-02-11T05:23:36-08:00</committed-date>
  <authored-date>2008-02-11T05:23:36-08:00</authored-date>
  <message>Fix for JRUBY-1100, truncate IV if it's too long. Also update JOpenSSL to new JRuby trunk, and to build with 1.5

git-svn-id: svn+ssh://rubyforge.org/var/svn/jruby-extras/trunk/jopenssl@896 8ba958d5-0c1a-0410-94a6-a65dfc1b28a6</message>
  <tree>24a1a2bbf5b4e664d1adb0b7f94f6781b421866a</tree>
  <committer>
    <name>olabini</name>
    <email>olabini@8ba958d5-0c1a-0410-94a6-a65dfc1b28a6</email>
  </committer>
</commit>
