• Jakub Kicinski's avatar
    tls: rx: support optimistic decrypt to user buffer with TLS 1.3 · ce61327c
    Jakub Kicinski authored
    We currently don't support decrypt to user buffer with TLS 1.3
    because we don't know the record type and how much padding
    record contains before decryption. In practice data records
    are by far most common and padding gets used rarely so
    we can assume data record, no padding, and if we find out
    that wasn't the case - retry the crypto in place (decrypt
    to skb).
    
    To safeguard from user overwriting content type and padding
    before we can check it attach a 1B sg entry where last byte
    of the record will land.
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ce61327c
tls_sw.c 64 KB