Changeset 7489a64 for core


Ignore:
Timestamp:
May 22, 2019 4:30:32 PM (10 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
2ec34f4
Parents:
06fa817
Message:

NetDB: Set secret and privkey before decrypting encls2

File:
1 edited

Legend:

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

    r06fa817 r7489a64  
    4141    private SigningPublicKey _unblindedSPK;
    4242    private String _secret;
     43    private PrivateKey _clientPrivateKey;
    4344    private final Log _log;
    4445
     
    8081    public void setSecret(String secret) {
    8182        _secret = secret;
     83    }
     84
     85    /**
     86     *  Must be set before verify for per-client auth.
     87     *
     88     *  @param privKey non-null
     89     *  @since 0.9.41
     90     */
     91    public void setClientPrivateKey(PrivateKey privKey) {
     92        _clientPrivateKey = privKey;
    8293    }
    8394
     
    841852     *
    842853     * Must call setDestination() prior to this if attempting decryption.
     854     * Must call setClientKey() prior to this if attempting decryption.
    843855     *
    844856     * @return valid
     
    846858    @Override
    847859    public boolean verifySignature() {
    848         return verifySignature((PrivateKey) null);
     860        return verifySignature(_clientPrivateKey);
    849861    }
    850862
Note: See TracChangeset for help on using the changeset viewer.