Changeset 8f4f7b7b for core/java


Ignore:
Timestamp:
Sep 12, 2017 10:08:09 AM (3 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
bcd7b7e
Parents:
10cfa6e (diff), 2cd9b34 (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.str4d.bench' (head 61fcef0f1004c55f7b15ba3982173050a952a08c)

to branch 'i2p.i2p' (head 8374318b8b49df7f47dfa0d2653413ceccab9b52)

Core: New benchmarking framework based on JMH (ticket #2036)

Location:
core/java/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/freenet/support/CPUInformation/IntelInfoImpl.java

    r10cfa6e r8f4f7b7b  
    438438                    // ref: http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/desktop-6th-gen-core-family-spec-update.pdf
    439439                    // See Haswell notes above
     440                    case 0x4e:
     441                    case 0x55:
    440442                    case 0x5e: {
    441443                        CPUIDCPUInfo c = new CPUIDCPUInfo();
  • core/java/src/net/i2p/CoreVersion.java

    r10cfa6e r8f4f7b7b  
    1919    public final static String ID = "Monotone";
    2020
    21     public final static String VERSION = "0.9.30";
     21    public final static String VERSION = "0.9.31";
    2222
    2323    /**
  • core/java/src/net/i2p/crypto/KeyStoreUtil.java

    r10cfa6e r8f4f7b7b  
    600600        }
    601601        Object[] rv = SelfSignedGenerator.generate(cname, ou, null, "I2P Anonymous Network", null, null, validDays, type);
    602         PublicKey jpub = (PublicKey) rv[0];
     602        //PublicKey jpub = (PublicKey) rv[0];
    603603        PrivateKey jpriv = (PrivateKey) rv[1];
    604604        X509Certificate cert = (X509Certificate) rv[2];
    605         X509CRL crl = (X509CRL) rv[3];
     605        //X509CRL crl = (X509CRL) rv[3];
    606606        List<X509Certificate> certs = Collections.singletonList(cert);
    607607        storePrivateKey(ks, ksPW, alias, keyPW, jpriv, certs);
  • core/java/src/net/i2p/crypto/SelfSignedGenerator.java

    r10cfa6e r8f4f7b7b  
    714714    private static final void test(String name, SigType type) throws Exception {
    715715            Object[] rv = generate("cname@example.com", "ou", "o", null, "st", "c", 3652, type);
    716             PublicKey jpub = (PublicKey) rv[0];
     716            //PublicKey jpub = (PublicKey) rv[0];
    717717            PrivateKey jpriv = (PrivateKey) rv[1];
    718718            X509Certificate cert = (X509Certificate) rv[2];
  • core/java/src/net/i2p/data/SigningPublicKey.java

    r10cfa6e r8f4f7b7b  
    133133            return new SigningPublicKey(null, _data);
    134134        int newLen = newType.getPubkeyLen();
    135         if (newLen == SigType.DSA_SHA1.getPubkeyLen())
     135        int ctype = kcert.getCryptoTypeCode();
     136        if (ctype == 0) {
     137            // prohibit excess key data
     138            // TODO non-zero crypto type if added
     139            int sz = 7;
     140            if (newLen > KEYSIZE_BYTES)
     141                sz += newLen - KEYSIZE_BYTES;
     142            if (kcert.size() != sz)
     143                throw new IllegalArgumentException("Excess data in key certificate");
     144        }
     145        if (newLen == KEYSIZE_BYTES)
    136146            return new SigningPublicKey(newType, _data);
    137147        byte[] newData = new byte[newLen];
    138         if (newLen < SigType.DSA_SHA1.getPubkeyLen()) {
     148        if (newLen < KEYSIZE_BYTES) {
    139149            // right-justified
    140150            System.arraycopy(_data, _data.length - newLen, newData, 0, newLen);
     
    164174            throw new IllegalStateException("Cannot convert " + _type + " to " + newType);
    165175        int newLen = newType.getPubkeyLen();
    166         if (newLen >= SigType.DSA_SHA1.getPubkeyLen())
     176        if (newLen >= KEYSIZE_BYTES)
    167177            return null;
    168         int padLen = SigType.DSA_SHA1.getPubkeyLen() - newLen;
     178        int padLen = KEYSIZE_BYTES - newLen;
    169179        byte[] pad = new byte[padLen];
    170180        System.arraycopy(_data, 0, pad, 0, padLen);
  • core/java/src/net/i2p/kademlia/KBucketSet.java

    r10cfa6e r8f4f7b7b  
    731731            throw new UnsupportedOperationException();
    732732        }
    733    
     733
    734734        public void clear() {}
    735735
     
    737737            throw new UnsupportedOperationException();
    738738        }
    739    
     739
    740740        public boolean remove(T peer) {
    741741            return false;
     
    766766    public String toString() {
    767767        StringBuilder buf = new StringBuilder(1024);
     768        buf.append("<div class=\"debug_container buckets\">");
    768769        buf.append("<hr><b>Bucket set rooted on:</b> ").append(_us.toString())
    769770           .append(" K=").append(BUCKET_SIZE)
     
    780781            }
    781782        } finally { releaseReadLock(); }
     783        buf.append("</div>");
    782784        return buf.toString();
    783785    }
  • core/java/src/net/i2p/util/EepGet.java

    r10cfa6e r8f4f7b7b  
    13971397            // This is kindof a hack, but if we are downloading a gzip file
    13981398            // we don't want to transparently gunzip it and save it as a .gz file.
    1399             (!path.endsWith(".gz")) && (!path.endsWith(".tgz")))
     1399            path == null ||
     1400            (!path.endsWith(".gz") && !path.endsWith(".tgz")))
    14001401            buf.append("gzip");
    14011402        buf.append("\r\n");
  • core/java/src/net/i2p/util/PortMapper.java

    r10cfa6e r8f4f7b7b  
    180180    public void renderStatusHTML(Writer out) throws IOException {
    181181        List<String> services = new ArrayList<String>(_dir.keySet());
    182         out.write("<h2>Port Mapper</h2><table><tr><th>Service<th>Host<th>Port\n");
     182        out.write("<h2 id=\"debug_portmapper\">Port Mapper</h2><table id=\"portmapper\"><tr><th>Service<th>Host<th>Port\n");
    183183        Collections.sort(services);
    184184        for (String s : services) {
Note: See TracChangeset for help on using the changeset viewer.