Changeset 40223 in project


Ignore:
Timestamp:
06/27/21 12:10:02 (3 months ago)
Author:
Vasilij Schneidermann
Message:

openssl: Clear errors only for non-free'd contexts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/openssl/trunk/openssl.digest.scm

    r40222 r40223  
    88   max-digest-size
    99   digest-context-allocate!
     10   digest-context-free!
    1011   digest-context-reset!
    1112   digest-context-init!
     
    125126
    126127(define (digest-context-reset! context)
    127   (ERR_clear_error)
    128128  (and-let* ((ctx (digest-context-ptr context)))
     129    (ERR_clear_error)
    129130    (when (not (EVP_MD_CTX_reset ctx))
    130131      (openssl-error 'digest-context-reset!))
     
    132133
    133134(define (digest-context-init! context digest #!key (oneshot #f))
    134   (ERR_clear_error)
    135135  (and-let* ((ctx (digest-context-ptr context)))
     136    (ERR_clear_error)
    136137    (when (not (EVP_DigestInit_ex ctx digest #f))
    137138      (openssl-error 'digest-context-init! (list digest)))
     
    141142
    142143(define (digest-context-update! context blob)
    143   (ERR_clear_error)
    144144  (and-let* ((ctx (digest-context-ptr context))
    145145             (size (blob-size blob)))
     146    (ERR_clear_error)
    146147    (when (not (EVP_DigestUpdate ctx blob size))
    147148      (openssl-error 'digest-context-update (list blob size)))
     
    149150
    150151(define (digest-context-final! context)
    151   (ERR_clear_error)
    152152  (and-let* ((ctx (digest-context-ptr context))
    153153             (blob (make-blob max-digest-size)))
     154    (ERR_clear_error)
    154155    (let-location ((size int))
    155156      (when (not (EVP_DigestFinal_ex (digest-context-ptr context) blob (location size)))
Note: See TracChangeset for help on using the changeset viewer.