diff options
author | Doug MacEachern <dougm@apache.org> | 2002-03-13 07:41:46 +0100 |
---|---|---|
committer | Doug MacEachern <dougm@apache.org> | 2002-03-13 07:41:46 +0100 |
commit | ed35c4722007c0a0cc421b4a6c4c8c6495982a74 (patch) | |
tree | 1ffdf7e9ea632aeaf0a6a88d9eaf34ee6e95f852 /modules/ssl/ssl_util_ssl.c | |
parent | SSL_SESSION_id2sz() is somewhat expensive, make sure we only call it (diff) | |
download | apache2-ed35c4722007c0a0cc421b4a6c4c8c6495982a74.tar.xz apache2-ed35c4722007c0a0cc421b4a6c4c8c6495982a74.zip |
SSL_SESSION_id2sz() was NOT THREAD SAFE. it returned a pointer to a
static variable. fixed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93899 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl/ssl_util_ssl.c')
-rw-r--r-- | modules/ssl/ssl_util_ssl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/ssl/ssl_util_ssl.c b/modules/ssl/ssl_util_ssl.c index b68ed6685e..d3792a14e5 100644 --- a/modules/ssl/ssl_util_ssl.c +++ b/modules/ssl/ssl_util_ssl.c @@ -535,15 +535,15 @@ int SSL_CTX_use_certificate_chain( ** _________________________________________________________________ */ -char *SSL_SESSION_id2sz(unsigned char *id, int idlen) +char *SSL_SESSION_id2sz(unsigned char *id, int idlen, + char *str, int strsize) { - static char str[(SSL_MAX_SSL_SESSION_ID_LENGTH+1)*2]; char *cp; int n; cp = str; for (n = 0; n < idlen && n < SSL_MAX_SSL_SESSION_ID_LENGTH; n++) { - apr_snprintf(cp, sizeof(str)-(cp-str), "%02X", id[n]); + apr_snprintf(cp, strsize - (cp-str), "%02X", id[n]); cp += 2; } *cp = NUL; |