F-15742: document that callback ByteBuffer arguments are only valid until the callback returns

pull/445/head
Chris Conlon 2026-10-22 15:11:29 -06:00
parent f5859e5d10
commit 83f788f977
14 changed files with 56 additions and 0 deletions

View File

@ -50,6 +50,10 @@ public interface WolfSSLByteBufferIORecvCallback {
* be read from the transport layer. The callback should read data and
* place the data into the buffer provided. The number of bytes read should
* be returned. The callback should return an error code on error.
* <p>
* The <b>buf</b> ByteBuffer wraps native memory that is only valid
* until this method returns. Do not use it, or any duplicate or
* slice of it, after returning.
*
* @param ssl the current SSL session object from which the callback was
* initiated.

View File

@ -51,6 +51,10 @@ public interface WolfSSLByteBufferIOSendCallback {
* The callback should send data from the provided ByteBuffer (buf) across
* the transport layer. The number of bytes sent should be returned, or
* a negative error code on error.
* <p>
* The <b>buf</b> ByteBuffer wraps native memory that is only valid
* until this method returns. Do not use it, or any duplicate or
* slice of it, after returning.
*
* @param ssl the current SSL session object from which the callback was
* initiated.

View File

@ -42,6 +42,10 @@ public interface WolfSSLDecryptVerifyCallback {
* Atomic record layer decrypt/verify callback method.
* This method acts as the decrypt/verify callback to be used with
* the wolfSSL atomic record layer processing.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the
* callback was initiated.

View File

@ -40,6 +40,10 @@ public interface WolfSSLEccSharedSecretCallback {
/**
* ECC shared secret callback method.
* This method acts as ECC shared secret callback.
* <p>
* The <b>out</b> buffer, and <b>pubKeyDer</b> on the client side, wrap
* native memory that is only valid until this method returns. Do not
* use them, or any duplicate or slice of them, after returning.
*
* @param ssl the current SSL session object from which the
* callback was initiated.

View File

@ -40,6 +40,10 @@ public interface WolfSSLEccSignCallback {
/**
* ECC signing callback method.
* This method acts as ECC signing callback.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the
* callback was initiated.

View File

@ -40,6 +40,10 @@ public interface WolfSSLEccVerifyCallback {
/**
* ECC verification callback method.
* This method acts as ECC verification callback.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the
* callback was initiated.

View File

@ -42,6 +42,10 @@ public interface WolfSSLMacEncryptCallback {
* Atomic record layer MAC Encrypt callback method.
* This method acts as the Atomic User Record Processing Mac/Encrypt
* callback to be used with the wolfSSL atomic record layer processing.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the
* callback was initiated.

View File

@ -40,6 +40,10 @@ public interface WolfSSLRsaDecCallback {
/**
* RSA private decrypt callback method.
* This method acts as RSA private decrypt callback.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the
* callback was initiated.

View File

@ -40,6 +40,10 @@ public interface WolfSSLRsaEncCallback {
/**
* RSA public encrypt callback method.
* This method acts as RSA public enrypt callback.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the
* callback was initiated.

View File

@ -40,6 +40,10 @@ public interface WolfSSLRsaPssSignCallback {
/**
* RSA-PSS signing callback method.
* This method acts as RSA-PSS signing callback.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the callback was
* initiated.

View File

@ -40,6 +40,10 @@ public interface WolfSSLRsaPssVerifyCallback {
/**
* RSA-PSS verification callback method.
* This method acts as RSA-PSS verification callback.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the callback
* was initiated.

View File

@ -40,6 +40,10 @@ public interface WolfSSLRsaSignCallback {
/**
* RSA signing callback method.
* This method acts as RSA signing callback.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the
* callback was initiated.

View File

@ -40,6 +40,10 @@ public interface WolfSSLRsaVerifyCallback {
/**
* RSA verification callback method.
* This method acts as RSA verification callback.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the
* callback was initiated.

View File

@ -43,6 +43,10 @@ public interface WolfSSLVerifyDecryptCallback {
* Atomic record layer verify/decrypt callback method.
* This method acts as the verify/decrypt callback to be used with
* the wolfSSL atomic record layer processing.
* <p>
* ByteBuffer arguments wrap native memory that is only valid until
* this method returns. Do not use them, or any duplicate or slice of
* them, after returning.
*
* @param ssl the current SSL session object from which the
* callback was initiated.