apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r597909 - /apr/apr-util/trunk/include/apr_ssl.h
Date Sat, 24 Nov 2007 20:30:29 GMT
Author: minfrin
Date: Sat Nov 24 12:30:17 2007
New Revision: 597909

URL: http://svn.apache.org/viewvc?rev=597909&view=rev
Log:
Add clarifying documentation for buffer handling.

Modified:
    apr/apr-util/trunk/include/apr_ssl.h

Modified: apr/apr-util/trunk/include/apr_ssl.h
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/include/apr_ssl.h?rev=597909&r1=597908&r2=597909&view=diff
==============================================================================
--- apr/apr-util/trunk/include/apr_ssl.h (original)
+++ apr/apr-util/trunk/include/apr_ssl.h Sat Nov 24 12:30:17 2007
@@ -318,7 +318,11 @@
  * @brief Encrypt/decrypt data provided by in, write it to out.
  * @note The number of bytes written will be written to outlen. If
  *       out is NULL, outlen will contain the maximum size of the
- *       buffer needed to hold the data.
+ *       buffer needed to hold the data, including any data
+ *       generated by apr_evp_crypt_final below. If *out points
+ *       to NULL, a buffer sufficiently large will be created from
+ *       the pool provided. If *out points to a not-NULL value, this
+ *       value will be used as a buffer instead.
  * @param evp The evp context to use.
  * @param out Address of a buffer to which data will be written,
  *        see note.
@@ -337,10 +341,15 @@
 /**
  * @brief Encrypt final data block, write it to out.
  * @note If necessary the final block will be written out after being
- *       padded. After this call, the context is cleaned and can be
+ *       padded. Typically the final block will be written to the
+ *       same buffer used by apr_evp_crypt, offset by the number of
+ *       bytes returned as actually written by the apr_evp_crypt()
+ *       call. After this call, the context is cleaned and can be
  *       reused by apr_env_encrypt_init() or apr_env_decrypt_init().
  * @param evp The evp context to use.
- * @param out Address of a buffer to which data will be written.
+ * @param out Address of a buffer to which data will be written. This
+ *            buffer must already exist, and is usually the same
+ *            buffer used by apr_evp_crypt(). See note.
  * @param outlen Length of the output will be written here.
  * @return APR_EGENERAL if an error occurred. Returns APR_ENOTIMPL if
  *         not supported.



Mime
View raw message