Changeset 5a1f738


Ignore:
Timestamp:
Sep 5, 2005 7:29:55 PM (15 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f958342
Parents:
8147cdf
git-author:
jrandom <jrandom> (09/05/05 19:29:55)
git-committer:
zzz <zzz@…> (09/05/05 19:29:55)
Message:

2005-09-05 jrandom

  • Expose the HTTP headers to EepGet? status listeners
  • Handle DSA key failures properly (if the signature is not invertable, it is obviously invalid)
Files:
5 edited

Legend:

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

    r8147cdf r5a1f738  
    8181            BigInteger r = new NativeBigInteger(1, rbytes);
    8282            BigInteger y = new NativeBigInteger(1, verifyingKey.getData());
    83             BigInteger w = s.modInverse(CryptoConstants.dsaq);
     83            BigInteger w = null;
     84            try {
     85                w = s.modInverse(CryptoConstants.dsaq);
     86            } catch (ArithmeticException ae) {
     87                return false;
     88            }
    8489            byte data[] = hash.getData();
    8590            NativeBigInteger bi = new NativeBigInteger(1, data);
  • core/java/src/net/i2p/data/DataHelper.java

    r8147cdf r5a1f738  
    218218        BufferedReader in = null;
    219219        try {
    220             in = new BufferedReader(new InputStreamReader(inStr), 16*1024);
     220            in = new BufferedReader(new InputStreamReader(inStr, "UTF-8"), 16*1024);
    221221            String line = null;
    222222            while ( (line = in.readLine()) != null) {
  • core/java/src/net/i2p/util/EepGet.java

    r8147cdf r5a1f738  
    169169        public void attemptFailed(String url, long bytesTransferred, long bytesRemaining, int currentAttempt, int numRetries, Exception cause);
    170170        public void transferFailed(String url, long bytesTransferred, long bytesRemaining, int currentAttempt);
     171        public void headerReceived(String url, int currentAttempt, String key, String val);
    171172    }
    172173    private class CLIStatusListener implements StatusListener {
     
    271272            System.out.println(buf.toString());
    272273        }
     274        public void headerReceived(String url, int currentAttempt, String key, String val) {}
    273275    }
    274276   
     
    490492
    491493    private void handle(String key, String val) {
     494        for (int i = 0; i < _listeners.size(); i++)
     495            ((StatusListener)_listeners.get(i)).headerReceived(_url, _currentAttempt, key.trim(), val.trim());
     496       
    492497        if (_log.shouldLog(Log.DEBUG))
    493498            _log.debug("Header line: [" + key + "] = [" + val + "]");
  • core/java/src/net/i2p/util/EepGetScheduler.java

    r8147cdf r5a1f738  
    7070    }
    7171   
     72    public void headerReceived(String url, int attemptNum, String key, String val) {}
    7273}
  • history.txt

    r8147cdf r5a1f738  
    1 $Id: history.txt,v 1.238 2005/09/04 14:15:51 jrandom Exp $
     1$Id: history.txt,v 1.239 2005/09/04 15:26:42 jrandom Exp $
     2
     32005-09-05  jrandom
     4    * Expose the HTTP headers to EepGet status listeners
     5    * Handle DSA key failures properly (if the signature is not invertable, it
     6      is obviously invalid)
    27
    382005-09-04  jrandom
Note: See TracChangeset for help on using the changeset viewer.