Changeset a3fe746


Ignore:
Timestamp:
May 29, 2019 11:53:55 AM (10 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e189236
Parents:
973aab8
Message:

store ls secret as b64

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java

    r973aab8 ra3fe746  
    1515import net.i2p.client.I2PClient;
    1616import net.i2p.crypto.SigType;
     17import net.i2p.data.Base64;
    1718import net.i2p.data.DataHelper;
    1819import net.i2p.data.Destination;
     
    597598     */
    598599    public String getBlindedPassword(int tunnel) {
    599         return getProperty(tunnel, "i2cp.leaseSetSecret", "");
     600        String rv = getProperty(tunnel, "i2cp.leaseSetSecret", null);
     601        if (rv != null)
     602            rv = DataHelper.getUTF8(Base64.decode(rv));
     603        if (rv == null)
     604            rv = "";
     605        return rv;
    600606    }
    601607   
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java

    r973aab8 ra3fe746  
    278278    public void setBlindedPassword(String s) {
    279279        if (s != null && s.length() > 0)
    280             _otherOptions.put("i2cp.leaseSetSecret", s);
     280            _otherOptions.put("i2cp.leaseSetSecret", Base64.encode(DataHelper.getUTF8(s.trim())));
    281281        else
    282282            _otherOptions.remove("i2cp.leaseSetSecret");
  • core/java/src/net/i2p/client/impl/RequestLeaseSetMessageHandler.java

    r973aab8 ra3fe746  
    133133                EncryptedLeaseSet encls2 = new EncryptedLeaseSet();
    134134                String secret = session.getOptions().getProperty(PROP_SECRET);
    135                 if (secret != null)
     135                if (secret != null) {
     136                    secret = DataHelper.getUTF8(Base64.decode(secret));
    136137                    encls2.setSecret(secret);
     138                }
    137139                leaseSet = encls2;
    138140            } else if (_ls2Type == DatabaseEntry.KEY_TYPE_META_LS2) {
  • router/java/src/net/i2p/router/client/ClientMessageEventListener.java

    r973aab8 ra3fe746  
    656656                if (secret != null) {
    657657                    EncryptedLeaseSet encls = (EncryptedLeaseSet) ls;
     658                    secret = DataHelper.getUTF8(Base64.decode(secret));
    658659                    encls.setSecret(secret);
    659660                }
Note: See TracChangeset for help on using the changeset viewer.