bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/25143] New: javax.crypto.EncryptedPrivateKeyInfo construc


From: berrange at redhat dot com
Subject: [Bug classpath/25143] New: javax.crypto.EncryptedPrivateKeyInfo constructor does not accept algorithm names, only OIDs
Date: 28 Nov 2005 17:59:29 -0000

If one creates an instance of the javax.crypto.EncryptedPrivateKeyInfo class
using the (String, byte[]) constructor, passing in an algorithm name such as
'DSA' as the first param, ClassPath throws a NumberFormatException while trying
to parse the algorithm name. It looks like the code is trying to treat the
algorithm name as if it were an algorithm OID, rather than a name:

java.lang.NumberFormatException
   at java.lang.Integer.parseInt (Integer.java:768)
   at java.lang.Integer.parseInt (Integer.java:261)
   at gnu.java.security.OID.fromString (OID.java:479)
   at gnu.java.security.OID.OID (OID.java:155)
   at gnu.java.security.OID.OID (OID.java:138)
   at javax.crypto.EncryptedPrivateKeyInfo.EncryptedPrivateKeyInfo
(EncryptedPrivateKeyInfo.java:171)


The API docs for EncryptedPrivateKeyInfo, however, suggest that using an 
algorithm name is allowed:

"algName - encryption algorithm name. See Appendix A in the  Java Cryptography
 Extension Reference Guide  for information about standard Cipher algorithm
 names."


-- 
           Summary: javax.crypto.EncryptedPrivateKeyInfo constructor does
                    not accept algorithm names, only OIDs
           Product: classpath
           Version: 0.19
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: berrange at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25143





reply via email to

[Prev in Thread] Current Thread [Next in Thread]