source: EcnlProtoTool/trunk/openssl-1.1.0e/engines/afalg/e_afalg.h@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 1.8 KB
Line 
1/*
2 * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#ifndef HEADER_AFALG_H
11# define HEADER_AFALG_H
12
13# ifdef ALG_DEBUG
14# define ALG_DGB(x, ...) fprintf(stderr, "ALG_DBG: " x, __VA_ARGS__)
15# define ALG_INFO(x, ...) fprintf(stderr, "ALG_INFO: " x, __VA_ARGS__)
16# define ALG_WARN(x, ...) fprintf(stderr, "ALG_WARN: " x, __VA_ARGS__)
17# else
18# define ALG_DGB(x, ...)
19# define ALG_INFO(x, ...)
20# define ALG_WARN(x, ...)
21# endif
22
23# define ALG_ERR(x, ...) fprintf(stderr, "ALG_ERR: " x, __VA_ARGS__)
24# define ALG_PERR(x, ...) \
25 do { \
26 fprintf(stderr, "ALG_PERR: " x, __VA_ARGS__); \
27 perror(NULL); \
28 } while(0)
29# define ALG_PWARN(x, ...) \
30 do { \
31 fprintf(stderr, "ALG_PERR: " x, __VA_ARGS__); \
32 perror(NULL); \
33 } while(0)
34
35# ifndef AES_BLOCK_SIZE
36# define AES_BLOCK_SIZE 16
37# endif
38# define AES_KEY_SIZE_128 16
39# define AES_IV_LEN 16
40
41# define MAX_INFLIGHTS 1
42
43typedef enum {
44 MODE_UNINIT = 0,
45 MODE_SYNC,
46 MODE_ASYNC
47} op_mode;
48
49struct afalg_aio_st {
50 int efd;
51 op_mode mode;
52 aio_context_t aio_ctx;
53 struct io_event events[MAX_INFLIGHTS];
54 struct iocb cbt[MAX_INFLIGHTS];
55};
56typedef struct afalg_aio_st afalg_aio;
57
58/*
59 * MAGIC Number to identify correct initialisation
60 * of afalg_ctx.
61 */
62# define MAGIC_INIT_NUM 0x1890671
63
64struct afalg_ctx_st {
65 int init_done;
66 int sfd;
67 int bfd;
68# ifdef ALG_ZERO_COPY
69 int zc_pipe[2];
70# endif
71 afalg_aio aio;
72};
73
74typedef struct afalg_ctx_st afalg_ctx;
75#endif
Note: See TracBrowser for help on using the repository browser.