Commit 15e05d4
committed
bcrypt: Allocate buffer for checksum context object in a pool.
* subversion/libsvn_subr/checksum_bcrypt.c
(bcrypt_ctx_t): Store a pointer to the object buffer to reuse later and
the pool where it can be allocated in delayed initialization.
(bcrypt_ctx_cleanup): Remove, because we no longer need to cleanup the buffer
manually -- it is allocated in a pool.
(bcrypt_ctx_init): Create the object buffer if it's NULL and supply it to
BCryptCreateHash().
(bcrypt_ctx_reset): memset object_buf with all-zeros instead of cleaning it
up via BCryptDestroyHash(). It's not mandatory to reset the memory but a
it's just a security consideration.
(svn_checksum__md5_ctx_create,
svn_checksum__sha1_ctx_create): Don't setup pool cleanup handler. Initialize
bcrypt_ctx.pool field.
git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1931094 13f79535-47bb-0310-9956-ffa450edef681 parent d3fab50 commit 15e05d4
1 file changed
+9
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 96 | | |
112 | 97 | | |
113 | 98 | | |
| |||
117 | 102 | | |
118 | 103 | | |
119 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
120 | 108 | | |
121 | 109 | | |
122 | | - | |
| 110 | + | |
123 | 111 | | |
124 | 112 | | |
125 | 113 | | |
| |||
166 | 154 | | |
167 | 155 | | |
168 | 156 | | |
169 | | - | |
| 157 | + | |
170 | 158 | | |
171 | 159 | | |
172 | 160 | | |
| |||
221 | 209 | | |
222 | 210 | | |
223 | 211 | | |
224 | | - | |
225 | | - | |
226 | | - | |
| 212 | + | |
227 | 213 | | |
228 | 214 | | |
229 | 215 | | |
| |||
269 | 255 | | |
270 | 256 | | |
271 | 257 | | |
272 | | - | |
273 | | - | |
274 | | - | |
| 258 | + | |
275 | 259 | | |
276 | 260 | | |
277 | 261 | | |
| |||
0 commit comments