File tree Expand file tree Collapse file tree
wrapper/rust/wolfssl-wolfcrypt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -545,17 +545,17 @@ impl Lms {
545545 Ok ( sig_sz as usize )
546546 }
547547
548- /// Return the number of signatures remaining for this key.
548+ /// Return whether there are more signatures remaining for this key.
549549 ///
550550 /// Returns `Ok(true)` if at least one signature remains, `Ok(false)` if
551551 /// exhausted, or `Err(e)` on error. This is a conservative check only.
552552 ///
553553 /// # Returns
554554 ///
555- /// Returns either Ok(count) on success or Err(e) containing the wolfSSL
556- /// library error code value.
555+ /// Returns either Ok(true) if any signatures remain, Ok(false) if
556+ /// exhausted, or Err(e) containing the wolfSSL library error code value.
557557 #[ cfg( lms_make_key) ]
558- pub fn sigs_left ( & mut self ) -> Result < bool , i32 > {
558+ pub fn has_sigs_left ( & mut self ) -> Result < bool , i32 > {
559559 let rc = unsafe { sys:: wc_LmsKey_SigsLeft ( & mut self . ws_key ) } ;
560560 if rc < 0 {
561561 return Err ( rc) ;
Original file line number Diff line number Diff line change @@ -350,11 +350,11 @@ fn test_export_pub_from() {
350350 let _ = store;
351351}
352352
353- /// Verify that `sigs_left ()` indicates signatures are available immediately
353+ /// Verify that `has_sigs_left ()` indicates signatures are available immediately
354354/// after `make_key()`.
355355#[ test]
356356#[ cfg( all( lms_make_key, random) ) ]
357- fn test_sigs_left_after_make_key ( ) {
357+ fn test_has_sigs_left_after_make_key ( ) {
358358 common:: setup ( ) ;
359359 let mut rng = RNG :: new ( ) . expect ( "Error creating RNG" ) ;
360360 let mut store = Box :: new ( KeyStore { buf : [ 0u8 ; 16384 ] } ) ;
@@ -365,8 +365,8 @@ fn test_sigs_left_after_make_key() {
365365 setup_callbacks ( & mut key, ctx) ;
366366 key. make_key ( & mut rng) . expect ( "Error with make_key()" ) ;
367367
368- let remaining = key. sigs_left ( ) . expect ( "Error with sigs_left ()" ) ;
369- assert ! ( remaining, "sigs_left must be true immediately after make_key()" ) ;
368+ let remaining = key. has_sigs_left ( ) . expect ( "Error with has_sigs_left ()" ) ;
369+ assert ! ( remaining, "has_sigs_left must be true immediately after make_key()" ) ;
370370
371371 let _ = store;
372372}
You can’t perform that action at this time.
0 commit comments