Exemple #1
0
 @JRubyMethod
 public IRubyObject to_der() {
   try {
     byte[] bytes = org.jruby.ext.openssl.impl.PKey.toDerDSAKey(pubKey, privKey);
     return RubyString.newString(getRuntime(), bytes);
   } catch (NoClassDefFoundError ncdfe) {
     throw newDSAError(getRuntime(), OpenSSLReal.bcExceptionMessage(ncdfe));
   } catch (IOException ioe) {
     throw newDSAError(getRuntime(), ioe.getMessage());
   }
 }