Page MenuHomeFreeBSD

D30447.diff
No OneTemporary

D30447.diff

diff --git a/sys/crypto/openssl/ossl_chacha20.c b/sys/crypto/openssl/ossl_chacha20.c
--- a/sys/crypto/openssl/ossl_chacha20.c
+++ b/sys/crypto/openssl/ossl_chacha20.c
@@ -65,15 +65,13 @@
resid = crp->crp_payload_length;
crypto_cursor_init(&cc_in, &crp->crp_buf);
crypto_cursor_advance(&cc_in, crp->crp_payload_start);
- inseg = crypto_cursor_segbase(&cc_in);
- inlen = crypto_cursor_seglen(&cc_in);
+ inseg = crypto_cursor_segment(&cc_in, &inlen);
if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) {
crypto_cursor_init(&cc_out, &crp->crp_obuf);
crypto_cursor_advance(&cc_out, crp->crp_payload_output_start);
} else
cc_out = cc_in;
- outseg = crypto_cursor_segbase(&cc_out);
- outlen = crypto_cursor_seglen(&cc_out);
+ outseg = crypto_cursor_segment(&cc_out, &outlen);
while (resid >= CHACHA_BLK_SIZE) {
if (inlen < CHACHA_BLK_SIZE) {
crypto_cursor_copydata(&cc_in, CHACHA_BLK_SIZE, block);
@@ -111,16 +109,14 @@
if (out == block) {
crypto_cursor_copyback(&cc_out, CHACHA_BLK_SIZE, block);
- outseg = crypto_cursor_segbase(&cc_out);
- outlen = crypto_cursor_seglen(&cc_out);
+ outseg = crypto_cursor_segment(&cc_out, &outlen);
} else {
crypto_cursor_advance(&cc_out, todo);
outseg += todo;
outlen -= todo;
}
if (in == block) {
- inseg = crypto_cursor_segbase(&cc_in);
- inlen = crypto_cursor_seglen(&cc_in);
+ inseg = crypto_cursor_segment(&cc_in, &inlen);
} else {
crypto_cursor_advance(&cc_in, todo);
inseg += todo;
@@ -196,15 +192,13 @@
resid = crp->crp_payload_length;
crypto_cursor_init(&cc_in, &crp->crp_buf);
crypto_cursor_advance(&cc_in, crp->crp_payload_start);
- inseg = crypto_cursor_segbase(&cc_in);
- inlen = crypto_cursor_seglen(&cc_in);
+ inseg = crypto_cursor_segment(&cc_in, &inlen);
if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) {
crypto_cursor_init(&cc_out, &crp->crp_obuf);
crypto_cursor_advance(&cc_out, crp->crp_payload_output_start);
} else
cc_out = cc_in;
- outseg = crypto_cursor_segbase(&cc_out);
- outlen = crypto_cursor_seglen(&cc_out);
+ outseg = crypto_cursor_segment(&cc_out, &outlen);
while (resid >= CHACHA_BLK_SIZE) {
if (inlen < CHACHA_BLK_SIZE) {
crypto_cursor_copydata(&cc_in, CHACHA_BLK_SIZE, block);
@@ -243,16 +237,14 @@
if (out == block) {
crypto_cursor_copyback(&cc_out, CHACHA_BLK_SIZE, block);
- outseg = crypto_cursor_segbase(&cc_out);
- outlen = crypto_cursor_seglen(&cc_out);
+ outseg = crypto_cursor_segment(&cc_out, &outlen);
} else {
crypto_cursor_advance(&cc_out, todo);
outseg += todo;
outlen -= todo;
}
if (in == block) {
- inseg = crypto_cursor_segbase(&cc_in);
- inlen = crypto_cursor_seglen(&cc_in);
+ inseg = crypto_cursor_segment(&cc_in, &inlen);
} else {
crypto_cursor_advance(&cc_in, todo);
inseg += todo;
@@ -368,15 +360,13 @@
resid = crp->crp_payload_length;
crypto_cursor_init(&cc_in, &crp->crp_buf);
crypto_cursor_advance(&cc_in, crp->crp_payload_start);
- inseg = crypto_cursor_segbase(&cc_in);
- inlen = crypto_cursor_seglen(&cc_in);
+ inseg = crypto_cursor_segment(&cc_in, &inlen);
if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) {
crypto_cursor_init(&cc_out, &crp->crp_obuf);
crypto_cursor_advance(&cc_out, crp->crp_payload_output_start);
} else
cc_out = cc_in;
- outseg = crypto_cursor_segbase(&cc_out);
- outlen = crypto_cursor_seglen(&cc_out);
+ outseg = crypto_cursor_segment(&cc_out, &outlen);
while (resid >= CHACHA_BLK_SIZE) {
if (inlen < CHACHA_BLK_SIZE) {
crypto_cursor_copydata(&cc_in, CHACHA_BLK_SIZE, block);
@@ -414,16 +404,14 @@
if (out == block) {
crypto_cursor_copyback(&cc_out, CHACHA_BLK_SIZE, block);
- outseg = crypto_cursor_segbase(&cc_out);
- outlen = crypto_cursor_seglen(&cc_out);
+ outseg = crypto_cursor_segment(&cc_out, &outlen);
} else {
crypto_cursor_advance(&cc_out, todo);
outseg += todo;
outlen -= todo;
}
if (in == block) {
- inseg = crypto_cursor_segbase(&cc_in);
- inlen = crypto_cursor_seglen(&cc_in);
+ inseg = crypto_cursor_segment(&cc_in, &inlen);
} else {
crypto_cursor_advance(&cc_in, todo);
inseg += todo;

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 1:34 AM (20 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14688072
Default Alt Text
D30447.diff (4 KB)

Event Timeline