Changeset a64d0a5


Ignore:
Timestamp:
Dec 31, 2010 1:16:46 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
cd1ed63
Parents:
1b74b49
Message:

preventing iMule from connecting on UDP
(thanks devzero)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/client/datagram/I2PDatagramDissector.java

    r1b74b49 ra64d0a5  
    3838    private Hash rxHash = null;
    3939
    40     private Signature rxSign = new Signature();
    41 
    42     private Destination rxDest = new Destination();
     40    private Signature rxSign;
     41
     42    private Destination rxDest;
    4343
    4444    private byte[] rxPayload = new byte[DGRAM_BUFSIZE];
     
    6969
    7070        try {
     71            rxDest = new Destination();
     72            rxSign = new Signature();
     73
    7174                        // read destination
    7275            rxDest.readBytes(dgStream);
     
    154157     */
    155158    public Destination extractSender() {
     159        if (this.rxDest == null)
     160            return null;
    156161        Destination retDest = new Destination();
    157162        try {
     
    185190            return;
    186191       
     192        if (rxSign == null || rxSign.getData() == null ||
     193            rxDest == null || rxDest.getSigningPublicKey() == null)
     194            throw new I2PInvalidDatagramException("Datagram not yet read");
     195
    187196        // now validate
    188197        if (!this.dsaEng.verifySignature(rxSign, rxHash.getData(), rxDest.getSigningPublicKey()))
Note: See TracChangeset for help on using the changeset viewer.