• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 Huawei Technologies Co., Ltd.
3  * Licensed under the Mulan PSL v2.
4  * You can use this software according to the terms and conditions of the Mulan PSL v2.
5  * You may obtain a copy of Mulan PSL v2 at:
6  *     http://license.coscl.org.cn/MulanPSL2
7  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
8  * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
9  * PURPOSE.
10  * See the Mulan PSL v2 for more details.
11  */
12 
13 #include <stdio.h>
14 #include "ui/ui_local.h"
15 #include "openssl/ossl_typ.h"
16 #include "crypto/evp.h"
17 #include "internal/dso.h"
18 #include "openssl/ossl_typ.h"
19 #include "arm_arch.h"
20 
21 unsigned int OPENSSL_armcap_P = ARMV8_AES | ARMV8_PMULL | ARMV8_SHA1 | ARMV8_SHA256 | ARMV7_NEON;
UI_new(void)22 UI *UI_new(void)
23 {
24     return NULL;
25 }
26 
UI_add_input_string(UI * ui,const char * prompt,int flags,char * result_buf,int minsize,int maxsize)27 int UI_add_input_string(UI *ui, const char *prompt, int flags,
28     char *result_buf, int minsize, int maxsize)
29 {
30     return -1;
31 }
32 
UI_add_verify_string(UI * ui,const char * prompt,int flags,char * result_buf,int minsize,int maxsize,const char * test_buf)33 int UI_add_verify_string(UI *ui, const char *prompt, int flags,
34     char *result_buf, int minsize, int maxsize,
35     const char *test_buf)
36 {
37     return -1;
38 }
39 
UI_process(UI * ui)40 int UI_process(UI *ui)
41 {
42     return -1;
43 }
44 
UI_free(UI * ui)45 void UI_free(UI *ui)
46 {
47 }
48 
async_deinit(void)49 void async_deinit(void)
50 {
51 }
52 
ossl_store_cleanup_int(void)53 void ossl_store_cleanup_int(void)
54 {
55 }
56 
async_delete_thread_state(void)57 void async_delete_thread_state(void)
58 {
59 }
60 
async_init(void)61 int async_init(void)
62 {
63     return 1;
64 }
65 
DSO_free(DSO * dso)66 int DSO_free(DSO *dso)
67 {
68     return 1;
69 }
70 
X448_public_from_private(uint8_t out_public_value[56],const uint8_t private_key[56])71 void X448_public_from_private(uint8_t out_public_value[56],
72                               const uint8_t private_key[56])
73 {
74 }
75 
ED448_public_from_private(uint8_t out_public_key[57],const uint8_t private_key[57])76 int ED448_public_from_private(uint8_t out_public_key[57],
77                               const uint8_t private_key[57])
78 {
79     return 1;
80 }
81 
X448(uint8_t out_shared_key[56],const uint8_t private_key[56],const uint8_t peer_public_value[56])82 int X448(uint8_t out_shared_key[56], const uint8_t private_key[56],
83          const uint8_t peer_public_value[56])
84 {
85     return 1;
86 }
87 
ED448_sign(uint8_t * out_sig,const uint8_t * message,size_t message_len,const uint8_t public_key[57],const uint8_t private_key[57],const uint8_t * context,size_t context_len)88 int ED448_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len,
89                const uint8_t public_key[57], const uint8_t private_key[57],
90                const uint8_t *context, size_t context_len)
91 {
92     return 1;
93 }
94 
ED448_verify(const uint8_t * message,size_t message_len,const uint8_t signature[114],const uint8_t public_key[57],const uint8_t * context,size_t context_len)95 int ED448_verify(const uint8_t *message, size_t message_len,
96                  const uint8_t signature[114], const uint8_t public_key[57],
97                  const uint8_t *context, size_t context_len)
98 {
99     return 1;
100 }
101 
getuid(void)102 int getuid(void)
103 {
104     return 0;
105 }
106 
geteuid(void)107 int geteuid(void)
108 {
109     return 0;
110 }
111 
getgid(void)112 int getgid(void)
113 {
114     return 0;
115 }
116 
getegid(void)117 int getegid(void)
118 {
119     return 0;
120 }
121 
getpid(void)122 int getpid(void)
123 {
124     return 0;
125 }
126 
openssl_config_int(const OPENSSL_INIT_SETTINGS * settings)127 int openssl_config_int(const OPENSSL_INIT_SETTINGS *settings)
128 {
129     return 1;
130 }
131 
openssl_no_config_int(void)132 void openssl_no_config_int(void)
133 {
134 }
135