source: EcnlProtoTool/trunk/openssl-1.1.0e/crypto/dso/dso_locl.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: 4.0 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#include <stdio.h>
11#include "internal/cryptlib.h"
12#include "internal/dso.h"
13#include "internal/dso_conf.h"
14
15/**********************************************************************/
16/* The low-level handle type used to refer to a loaded shared library */
17
18struct dso_st {
19 DSO_METHOD *meth;
20 /*
21 * Standard dlopen uses a (void *). Win32 uses a HANDLE. VMS doesn't use
22 * anything but will need to cache the filename for use in the dso_bind
23 * handler. All in all, let each method control its own destiny.
24 * "Handles" and such go in a STACK.
25 */
26 STACK_OF(void) *meth_data;
27 int references;
28 int flags;
29 /*
30 * For use by applications etc ... use this for your bits'n'pieces, don't
31 * touch meth_data!
32 */
33 CRYPTO_EX_DATA ex_data;
34 /*
35 * If this callback function pointer is set to non-NULL, then it will be
36 * used in DSO_load() in place of meth->dso_name_converter. NB: This
37 * should normally set using DSO_set_name_converter().
38 */
39 DSO_NAME_CONVERTER_FUNC name_converter;
40 /*
41 * If this callback function pointer is set to non-NULL, then it will be
42 * used in DSO_load() in place of meth->dso_merger. NB: This should
43 * normally set using DSO_set_merger().
44 */
45 DSO_MERGER_FUNC merger;
46 /*
47 * This is populated with (a copy of) the platform-independent filename
48 * used for this DSO.
49 */
50 char *filename;
51 /*
52 * This is populated with (a copy of) the translated filename by which
53 * the DSO was actually loaded. It is NULL iff the DSO is not currently
54 * loaded. NB: This is here because the filename translation process may
55 * involve a callback being invoked more than once not only to convert to
56 * a platform-specific form, but also to try different filenames in the
57 * process of trying to perform a load. As such, this variable can be
58 * used to indicate (a) whether this DSO structure corresponds to a
59 * loaded library or not, and (b) the filename with which it was actually
60 * loaded.
61 */
62 char *loaded_filename;
63 CRYPTO_RWLOCK *lock;
64};
65
66struct dso_meth_st {
67 const char *name;
68 /*
69 * Loads a shared library, NB: new DSO_METHODs must ensure that a
70 * successful load populates the loaded_filename field, and likewise a
71 * successful unload OPENSSL_frees and NULLs it out.
72 */
73 int (*dso_load) (DSO *dso);
74 /* Unloads a shared library */
75 int (*dso_unload) (DSO *dso);
76 /*
77 * Binds a function - assumes a return type of DSO_FUNC_TYPE. This should
78 * be cast to the real function prototype by the caller. Platforms that
79 * don't have compatible representations for different prototypes (this
80 * is possible within ANSI C) are highly unlikely to have shared
81 * libraries at all, let alone a DSO_METHOD implemented for them.
82 */
83 DSO_FUNC_TYPE (*dso_bind_func) (DSO *dso, const char *symname);
84 /*
85 * The generic (yuck) "ctrl()" function. NB: Negative return values
86 * (rather than zero) indicate errors.
87 */
88 long (*dso_ctrl) (DSO *dso, int cmd, long larg, void *parg);
89 /*
90 * The default DSO_METHOD-specific function for converting filenames to a
91 * canonical native form.
92 */
93 DSO_NAME_CONVERTER_FUNC dso_name_converter;
94 /*
95 * The default DSO_METHOD-specific function for converting filenames to a
96 * canonical native form.
97 */
98 DSO_MERGER_FUNC dso_merger;
99 /* [De]Initialisation handlers. */
100 int (*init) (DSO *dso);
101 int (*finish) (DSO *dso);
102 /* Return pathname of the module containing location */
103 int (*pathbyaddr) (void *addr, char *path, int sz);
104 /* Perform global symbol lookup, i.e. among *all* modules */
105 void *(*globallookup) (const char *symname);
106};
Note: See TracBrowser for help on using the repository browser.