Changeset d27000e for core/java


Ignore:
Timestamp:
Sep 26, 2018 3:19:14 PM (23 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
22a0f39
Parents:
b82ace8
Message:

Crypto: Avoid java-to-i2p ECDSA privkey conversion when generating CRL,
failing on Android for unknown reasons (ticket #2296)

Location:
core/java/src/net/i2p/crypto
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/crypto/SelfSignedGenerator.java

    rb82ace8 rd27000e  
    234234            throw new GeneralSecurityException("cert error", iae);
    235235        }
    236         X509CRL crl = generateCRL(cert, validDays, 1, sigoid, jpriv);
     236        X509CRL crl = generateCRL(cert, validDays, 1, sigoid, priv);
    237237
    238238        // some simple tests
     
    282282     */
    283283    private static X509CRL generateCRL(X509Certificate cert, int validDays, int crlNum,
    284                                        byte[] sigoid, PrivateKey jpriv) throws GeneralSecurityException {
    285 
    286         SigningPrivateKey priv = SigUtil.fromJavaKey(jpriv);
    287 
     284                                       byte[] sigoid, SigningPrivateKey priv) throws GeneralSecurityException {
    288285        byte[] tbs = genTBSCRL(cert, validDays, crlNum, sigoid);
    289286        int tbslen = tbs.length;
  • core/java/src/net/i2p/crypto/SigUtil.java

    rb82ace8 rd27000e  
    190190            else if (spec.equals(SigType.ECDSA_SHA512_P521.getParams()))
    191191                type = SigType.ECDSA_SHA512_P521;
    192             else
     192            else {
     193                // failing on Android (ticket #2296)
    193194                throw new IllegalArgumentException("Unknown EC type: " + pk.getClass() + " spec: " + spec.getClass());
     195            }
    194196            return fromJavaKey(k, type);
    195197        }
Note: See TracChangeset for help on using the changeset viewer.