Changeset 3a30f07


Ignore:
Timestamp:
Feb 6, 2019 11:54:29 AM (17 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
490b81c
Parents:
61c6242
Message:

I2CP: Prevent use of repliable datagrams with offline keys

File:
1 edited

Legend:

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

    r61c6242 r3a30f07  
    4646     * repliable datagrams going to be sent through the specified I2PSession.
    4747     *
     48     * Does NOT support LS2 offline keys!
     49     *
    4850     * @param session I2PSession used to send I2PDatagrams through
     51     * @throws IllegalArgumentException if session has offline keys
    4952     */
    5053    public I2PDatagramMaker(I2PSession session) {
     
    6063    }
    6164
     65    /**
     66     * Does NOT support LS2 offline keys!
     67     *
     68     * @param session I2PSession used to send I2PDatagrams through
     69     * @throws IllegalArgumentException if session has offline keys
     70     */
    6271    public void setI2PDatagramMaker(I2PSession session) {
     72        if (session.isOffline())
     73            throw new IllegalArgumentException("Offline keys unsupported");
    6374        sxPrivKey = session.getPrivateKey();
    6475        sxDestBytes = session.getMyDestination().toByteArray();
Note: See TracChangeset for help on using the changeset viewer.