git: cryptoapi - simplify session handling

Michael Neumann mneumann at crater.dragonflybsd.org
Mon Apr 21 03:53:08 PDT 2025


commit b2063f7fa9ef859854947e83cae8137791fbcd75
Author: Michael Neumann <mneumann at ntecs.de>
Date:   Sat Apr 19 14:18:21 2025 +0200

    cryptoapi - simplify session handling
    
    * Make cryptoapi_cipher_session an opaque type.
    
    * Rename cryptoapi_cipher_initsession() to
      cryptoapi_cipher_newsession() and return a pointer to the allocated
      session, or NULL in case kmalloc() fails.
    
    * Allocate enough memory in order to have space for the cipher context
      plus padding for proper alignment.
    
    * No longer return an error from cryptoapi_cipher_freesession().
      Silently do the job.

Summary of changes:
 sys/crypto/cryptoapi/cryptoapi.c | 126 +++++++++++++++++++--------------------
 sys/crypto/cryptoapi/cryptoapi.h |  25 ++++----
 2 files changed, 74 insertions(+), 77 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b2063f7fa9ef859854947e83cae8137791fbcd75


-- 
DragonFly BSD source repository


More information about the Commits mailing list