source: EcnlProtoTool/trunk/openssl-1.1.0e/crypto/engine/tb_eckey.c@ 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-csrc
File size: 1.8 KB
Line 
1/*
2 * Copyright 2015-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#include "eng_int.h"
11
12static ENGINE_TABLE *dh_table = NULL;
13static const int dummy_nid = 1;
14
15void ENGINE_unregister_EC(ENGINE *e)
16{
17 engine_table_unregister(&dh_table, e);
18}
19
20static void engine_unregister_all_EC(void)
21{
22 engine_table_cleanup(&dh_table);
23}
24
25int ENGINE_register_EC(ENGINE *e)
26{
27 if (e->ec_meth != NULL)
28 return engine_table_register(&dh_table,
29 engine_unregister_all_EC, e, &dummy_nid,
30 1, 0);
31 return 1;
32}
33
34void ENGINE_register_all_EC()
35{
36 ENGINE *e;
37
38 for (e = ENGINE_get_first(); e; e = ENGINE_get_next(e))
39 ENGINE_register_EC(e);
40}
41
42int ENGINE_set_default_EC(ENGINE *e)
43{
44 if (e->ec_meth != NULL)
45 return engine_table_register(&dh_table,
46 engine_unregister_all_EC, e, &dummy_nid,
47 1, 1);
48 return 1;
49}
50
51/*
52 * Exposed API function to get a functional reference from the implementation
53 * table (ie. try to get a functional reference from the tabled structural
54 * references).
55 */
56ENGINE *ENGINE_get_default_EC(void)
57{
58 return engine_table_select(&dh_table, dummy_nid);
59}
60
61/* Obtains an EC_KEY implementation from an ENGINE functional reference */
62const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e)
63{
64 return e->ec_meth;
65}
66
67/* Sets an EC_KEY implementation in an ENGINE structure */
68int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ec_meth)
69{
70 e->ec_meth = ec_meth;
71 return 1;
72}
Note: See TracBrowser for help on using the repository browser.