Changeset 04c342e


Ignore:
Timestamp:
Dec 9, 2013 4:38:00 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5b9fb40
Parents:
27ce280
Message:

PrivateKeyFile?: Fix ISE (ticket #1145)

broken in 0.9.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/data/PrivateKeyFile.java

    r27ce280 r04c342e  
    193193    }
    194194   
    195     /** change cert type - caller must also call write() */
     195    /**
     196     * Change cert type - caller must also call write().
     197     * Side effect - creates new Destination object.
     198     */
    196199    public Certificate setCertType(int t) {
    197200        if (this.dest == null)
     
    199202        Certificate c = new Certificate();
    200203        c.setCertificateType(t);
    201         this.dest.setCertificate(c);
     204        // dests now immutable, must create new
     205        Destination newdest = new Destination();
     206        newdest.setPublicKey(dest.getPublicKey());
     207        newdest.setSigningPublicKey(dest.getSigningPublicKey());
     208        newdest.setCertificate(c);
     209        dest = newdest;
    202210        return c;
    203211    }
Note: See TracChangeset for help on using the changeset viewer.