Changeset 645bd3d


Ignore:
Timestamp:
Mar 19, 2016 3:18:17 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ed72847
Parents:
25514e9 (diff), 2e7a7f2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

propagate from branch 'i2p.i2p' (head 110585552852c1f9c61a3a2efb4f17d62b0c1b2e)

to branch 'i2p.i2p.zzz.test2' (head 558ec52091868b7fa66af462f84044df1bede8cb)

Files:
2 edited

Legend:

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

    r25514e9 r645bd3d  
    1616import java.security.KeyPair;
    1717import java.security.KeyPairGenerator;
     18import java.security.MessageDigest;
    1819import java.security.ProviderException;
    1920import java.security.interfaces.ECPrivateKey;
     
    417418            System.out.println(type + " private-to-public test FAILED");
    418419        //System.out.println("privkey " + keys[1]);
     420          MessageDigest md = type.getDigestInstance();
    419421        for (int i = 0; i < runs; i++) {
    420422            RandomSource.getInstance().nextBytes(src);
     423              md.update(src);
     424              byte[] sha = md.digest();
     425              SimpleDataStructure hash = type.getHashInstance();
     426              hash.setData(sha);
    421427            long start = System.nanoTime();
    422428            Signature sig = DSAEngine.getInstance().sign(src, privkey);
     429            Signature sig2 = DSAEngine.getInstance().sign(hash, privkey);
    423430            if (sig == null)
    424431                throw new GeneralSecurityException("signature generation failed");
     432            if (sig2 == null)
     433                throw new GeneralSecurityException("signature generation (H) failed");
    425434            long mid = System.nanoTime();
    426435            boolean ok = DSAEngine.getInstance().verifySignature(sig, src, pubkey);
     436            boolean ok2 = DSAEngine.getInstance().verifySignature(sig2, hash, pubkey);
    427437            long end = System.nanoTime();
    428438            stime += mid - start;
     
    430440            if (!ok)
    431441                throw new GeneralSecurityException(type + " V(S(data)) fail");
     442            if (!ok2)
     443                throw new GeneralSecurityException(type + " V(S(H(data))) fail");
    432444        }
    433445        stime /= 1000*1000;
  • router/java/src/net/i2p/router/StatisticsManager.java

    r25514e9 r645bd3d  
    7272        Properties stats = new Properties();
    7373        stats.setProperty("router.version", RouterVersion.VERSION);
    74         // scheduled for removal, never used
    75         if (CoreVersion.VERSION.equals("0.9.23"))
    76             stats.setProperty("coreVersion", CoreVersion.VERSION);
     74        // never used
     75        //stats.setProperty("coreVersion", CoreVersion.VERSION);
    7776        stats.setProperty(RouterInfo.PROP_NETWORK_ID, _networkID);
    7877        stats.setProperty(RouterInfo.PROP_CAPABILITIES, _context.router().getCapabilities());
     
    169168
    170169        // So that we will still get build requests - not required since 0.7.9 2010-01-12
    171         // scheduled for removal
    172         if (CoreVersion.VERSION.equals("0.9.23"))
    173             stats.setProperty("stat_uptime", "90m");
     170        //stats.setProperty("stat_uptime", "90m");
    174171        if (FloodfillNetworkDatabaseFacade.isFloodfill(_context.router().getRouterInfo())) {
    175172            int ri = _context.router().getUptime() > 30*60*1000 ?
Note: See TracChangeset for help on using the changeset viewer.