RE: Status of == vs equals() RESULTS

2010-08-09 Thread Pellerin, Clement
In JDK 1.5, String.equals() begins with: public boolean equals(Object anObject) { if (this == anObject) { return true; } ... Since String is a final class, the JIT compiler is free to in-line String.equals() This is such a common case, I bet the JIT compiler t

RE: [Proposal] KeyResolvers

2010-06-18 Thread Pellerin, Clement
On June 14, 2010 10:30 AM, Clement Pellerin wrote: > Now that we know X509IssuerSerialResolver must resolve PrivateKeys, where > does it get it from? > I believe the answer is: the same place where it gets the list of > certificates. > My proposal is to augument the StorageResolver to return an i

[BUG} KeyStoreResolver iterator can return null

2010-06-14 Thread Pellerin, Clement
When iterating the certificates in a KeyStoreResolver, the iterator might return null even though hasNext() says there are more elements. This happens because hasNext() only checks if there are more aliases. If the next alias contains a symmetric key, there is no certificate in the KeyStore entr

[BUG] StorageResolver.next() gives ClassCastException

2010-06-14 Thread Pellerin, Clement
The return type of StorageResolver.next() is X509Certificate, but the implementation attempts to return an StorageResolverSpi instance causing a ClassCastException. The way the KeyResolvers call this method, it appears the API is correct but the implementation is wrong. Indeed, I like the fact t

RE: Distinguishing JRE JSR105 Impl and Santuario Impl

2010-06-14 Thread Pellerin, Clement
It would be easier if the Provider.getInfo() were different... I found one difference though, it appears Inclusive C14N 1.1 and InclusiveWithComments C14N 1.1 are in xml-security but missing in JDK 1.6 -Original Message- From: Chad La Joie [mailto:laj...@itumi.biz] Sent: Monday, June 14,

RE: [Proposal] KeyResolvers

2010-06-14 Thread Pellerin, Clement
On June 11, 2010 5:56 PM, Chad La Joie wrote: > On 6/4/10 9:15 AM, Pellerin, Clement wrote: > > What is the recommended way to implement a KeyResolver for an EncryptedKey > > where the KEK is a PublicKey? > > > > At first I thought I could write a Resolver for the KEK

RE: [Proposal] KeyResolvers

2010-06-11 Thread Pellerin, Clement
>> From: Pellerin, Clement >> What is the recommended way to implement a KeyResolver for an EncryptedKey >> where the KEK is a PublicKey? >> ... If the library already supports my use case, I would be thrilled to learn how to use it correctly. Otherwise I would like t

[Proposal] KeyResolvers

2010-06-04 Thread Pellerin, Clement
What is the recommended way to implement a KeyResolver for an EncryptedKey where the KEK is a PublicKey? At first I thought I could write a Resolver for the KEK PrivateKey and let the EncryptedKeyResolver call it. Unfortunately, the KeyResolverSpi API can return a SecretKey but there is no prov

internal KeyResolvers

2010-05-28 Thread Pellerin, Clement
I am using xmlsec-1.4.3 I am working on a KeyResolver to return the Key Encryption Key needed by the decryptor. I can write a global KeyResolver and register it in the config file or through KeyResolver.register() I can also register an internal KeyResolver directly on the KeyInfo instance usin