Patrick wrote:

>I believe your JSS doc calls for a Sun public key: It shows public void
>initVerify(java.security.PublicKey publicKey)...
>Incorrect doc?
>
>-- P
>
PK11PubKey implements java.security.PublicKey.

org.mozilla.jss.crypto.Signature is modeled after 
java.security.Signature, which specifies java.security.PublicKey as the 
argument to initVerify. Eventually we will deprecate our Signature in 
favor of complete JCA compliance. So we have to keep the type 
j.s.PublicKey, even though we really only accept o.m.j.pkcs11.PK11PubKey.

The JCA allows for the fact that keys cannot always be swapped between 
providers. In general, a key is a handle to an underlying object on a 
PKCS #11 token, not merely a Java object residing in memory. Satisfying 
the language's type constraints is not sufficient to ensure a valid 
argument to this method.


Reply via email to