Changeset 5440a34 for core


Ignore:
Timestamp:
Feb 21, 2019 4:16:27 PM (15 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
9cd90b0
Parents:
9fafc25
Message:

I2CP: Force i2cp.leaseSetType option for offline keys

Location:
core/java/src/net/i2p/client/impl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/client/impl/I2CPMessageProducer.java

    r9fafc25 r5440a34  
    121121        CreateSessionMessage msg = new CreateSessionMessage();
    122122        SessionConfig cfg = new SessionConfig(session.getMyDestination());
    123         cfg.setOptions(getRouterOptions(session));
    124         if (session.isOffline()) {
     123        Properties p = getRouterOptions(session);
     124        boolean isOffline = session.isOffline();
     125        if (isOffline) {
     126            if (!p.containsKey(RequestLeaseSetMessageHandler.PROP_LS_TYPE))
     127                p.setProperty(RequestLeaseSetMessageHandler.PROP_LS_TYPE, "3");
     128        }
     129        cfg.setOptions(p);
     130        if (isOffline) {
    125131            cfg.setOfflineSignature(session.getOfflineExpiration(),
    126132                                    session.getTransientSigningPublicKey(),
  • core/java/src/net/i2p/client/impl/RequestLeaseSetMessageHandler.java

    r9fafc25 r5440a34  
    6464    private static final String PROP_LS_SPK = "i2cp.leaseSetSigningPrivateKey";
    6565    // LS 2
    66     private static final String PROP_LS_TYPE = "i2cp.leaseSetType";
     66    public static final String PROP_LS_TYPE = "i2cp.leaseSetType";
    6767    private static final String PROP_LS_ENCTYPE = "i2cp.leaseSetEncType";
    6868
Note: See TracChangeset for help on using the changeset viewer.