mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 07:15:58 +08:00
Update to FreeBSD head 2018-10-23
Git mirror commit 59f44d20be3f99d181ca742e636d45fc39ec982b. This commit updates OpenSSL to version 1.1.1. This required an update of racoon which uses some internal stuff from OpenSSL and seems to be mostly unmaintained, e.g. there is update in the FreeBSD ports to cope with OpenSSL 1.1.1. Update #3472.
This commit is contained in:
15
freebsd/sys/crypto/chacha20/_chacha.h
Normal file
15
freebsd/sys/crypto/chacha20/_chacha.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/* $FreeBSD$ */
|
||||
/*
|
||||
* Public domain.
|
||||
*/
|
||||
|
||||
#ifndef _CHACHA_H
|
||||
#define _CHACHA_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
struct chacha_ctx {
|
||||
u_int input[16];
|
||||
};
|
||||
|
||||
#endif
|
@@ -130,8 +130,10 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u_int bytes)
|
||||
|
||||
for (;;) {
|
||||
if (bytes < 64) {
|
||||
#ifndef KEYSTREAM_ONLY
|
||||
for (i = 0;i < bytes;++i) tmp[i] = m[i];
|
||||
m = tmp;
|
||||
#endif
|
||||
ctarget = c;
|
||||
c = tmp;
|
||||
}
|
||||
|
@@ -12,10 +12,7 @@ Public domain.
|
||||
#define CHACHA_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
struct chacha_ctx {
|
||||
u_int input[16];
|
||||
};
|
||||
#include <crypto/chacha20/_chacha.h>
|
||||
|
||||
#define CHACHA_MINKEYLEN 16
|
||||
#define CHACHA_NONCELEN 8
|
||||
@@ -23,10 +20,10 @@ struct chacha_ctx {
|
||||
#define CHACHA_STATELEN (CHACHA_NONCELEN+CHACHA_CTRLEN)
|
||||
#define CHACHA_BLOCKLEN 64
|
||||
|
||||
#ifdef _KERNEL
|
||||
#define LOCAL
|
||||
#else
|
||||
#ifdef CHACHA_EMBED
|
||||
#define LOCAL static
|
||||
#else
|
||||
#define LOCAL
|
||||
#endif
|
||||
|
||||
LOCAL void chacha_keysetup(struct chacha_ctx *x, const u_char *k, u_int kbits);
|
||||
|
Reference in New Issue
Block a user