Vladimir
Hi,
I'm trying to use the java.security.KeyPairGenerator via JRuby 1.7 RC2 as per
the following code:
require 'java'
kp = java.security.KeyPairGenerator.getInstance("RSA")
puts kp #java.security.KeyPairGenerator$Delegate@45f177b
However, when I try to call initialize i.e.
kp.initialize(2048)
I
I think you hit this namespace conflict problem:
http://jira.codehaus.org/browse/JRUBY-45
so it seems you need to use
kp.java_send :initialize, 2048
instead.
On Wed, Oct 17, 2012 at 3:56 PM, Carl Bourne wrote:
> Hi,
>
> I'm trying to use the java.security.KeyPairGenerator via JRuby 1.7 RC2 as
>
There should also be an initialize__method you can call for the same
effect. Any methods we don't directly map (usually due to naming
conflict) we will add a __method alias for.
- Charlie
On Wed, Oct 17, 2012 at 9:04 AM, Lars Westergren
wrote:
> I think you hit this namespace conflict problem:
>
Thanks for this!
So when I tried:
> kp.java_send :initialize, 2048
I got the following error:-
TypeError: can't convert Fixnum into Array
However, as per Charles suggestion, this worked:-
> kp.initialize__method(2048)
Regards,
Carl
On 17 Oct 2012, at 15:10, Charles Oliver Nutter wrote:
Garrett H
Hi,
I'm trying to do the equivalent of this in JRuby.
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE, -1);
Date notBefore = cal.getTime();
cal.add(Calendar.DATE, 2);
Date notAfter = cal.getTime();
This is my JRuby code:
r
You should use Calendar::DATE instead, since the value is an exposed
constant rather than method.
On Oct 17, 2012 10:19 AM, "Carl Bourne" wrote:
> Hi,
>
> I'm trying to do the equivalent of this in JRuby.
>
> Calendar cal = Calendar.getInstance();
> cal.add(Calendar.DATE,
Thanks very much - that did the trick.
On 17 Oct 2012, at 16:33, Anthony Juckel wrote:
> You should use Calendar::DATE instead, since the value is an exposed constant
> rather than method.
>
> On Oct 17, 2012 10:19 AM, "Carl Bourne" wrote:
> Hi,
>
> I'm trying to do the equivalent of this i
On Wed, Oct 17, 2012 at 9:21 AM, Carl Bourne wrote:
> So when I tried:
>
>> kp.java_send :initialize, 2048
>
> I got the following error:-
>
> TypeError: can't convert Fixnum into Array
java_send takes the following params:
* name of the target Java method
* an array of Java types for the target
On Oct 17, 2012, at 12:59 PM, Charles Oliver Nutter wrote:
> On Wed, Oct 17, 2012 at 9:21 AM, Carl Bourne wrote:
>> So when I tried:
>>
>>> kp.java_send :initialize, 2048
>>
>> I got the following error:-
>>
>> TypeError: can't convert Fixnum into Array
>
> java_send takes the following par
Hi,
I need to do the equivalent of this in JRuby:--
PKCS10CertificationRequest csr = csrBuilder.build(signer);
Which equates to what I think is casting a
"org.bouncycastle.pkcs.PKCS10CertificationRequestHolder" object to a
"org.bouncycastle.pkcs.PKCS10CertificationRequest" object.
Is this po
Chuck Rem
There's no casting (in the usual Java sense) required in JRuby; if the
methods exist, they'll be callable. Just go with it :)
- Charlie
On Wed, Oct 17, 2012 at 1:08 PM, Carl Bourne wrote:
> Hi,
>
> I need to do the equivalent of this in JRuby:--
>
> PKCS10CertificationRequest csr = csrBuilder.bu
Charles,
Maybe I'm getting my terminology mixed up here.
I basically have two different types of object .
>> PKCS10CertificationRequestHolder and a
>> PKCS10CertificationRequest
In order for me to pass the holder object to another class the holder object
needs to be just a request object
Yes, I think I was confused by your terminology.
Assuming the original Java code is right, here's the Ruby code:
csr = csrBuilder.build(signer)
- Charlie
On Wed, Oct 17, 2012 at 2:03 PM, Carl Bourne wrote:
> Charles,
>
> Maybe I'm getting my terminology mixed up here.
>
> I basically have two
Theo Hult
Theo Hult
Leif Warn
Tim Olsen
Oliver yes I did try that but it still doesn't seem to work as I would expect.
Heres a bit more background to the problem.
Using this Java code:
// Generate the certificate signing request
PKCS10CertificationRequestBuilder csrBuilder = new
PKCS10CertificationRequestBuilder(entityN
On Wed, Oct 17, 2012 at 6:44 PM, Carl Bourne wrote:
> Using this Java code:
>
> // Generate the certificate signing request
> PKCS10CertificationRequestBuilder csrBuilder = new
> PKCS10CertificationRequestBuilder(entityName, publicKeyInfo);
>
> csrBuilder.addAttribute(PKC
Joshua Ba
23 matches
Mail list logo