diff options
| author | deraadt <> | 2015-08-19 18:25:31 +0000 |
|---|---|---|
| committer | deraadt <> | 2015-08-19 18:25:31 +0000 |
| commit | 0e889cf1500dcc11cc9011a890b5cf7665b14bef (patch) | |
| tree | 4dd2e1ed4371a029d61ada8e510e7ace4f672ad6 /src/usr.bin/openssl/openssl.c | |
| parent | 13757ff35aab44e1c38d969b3e78d8029b01eb32 (diff) | |
| download | openbsd-0e889cf1500dcc11cc9011a890b5cf7665b14bef.tar.gz openbsd-0e889cf1500dcc11cc9011a890b5cf7665b14bef.tar.bz2 openbsd-0e889cf1500dcc11cc9011a890b5cf7665b14bef.zip | |
bring prototypes into scope, requires movement of a large global object
out of .h file
ok jsing
Diffstat (limited to '')
| -rw-r--r-- | src/usr.bin/openssl/openssl.c | 196 |
1 files changed, 195 insertions, 1 deletions
diff --git a/src/usr.bin/openssl/openssl.c b/src/usr.bin/openssl/openssl.c index 08e22ca829..1754b3a107 100644 --- a/src/usr.bin/openssl/openssl.c +++ b/src/usr.bin/openssl/openssl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: openssl.c,v 1.3 2015/03/22 10:36:22 bcook Exp $ */ | 1 | /* $OpenBSD: openssl.c,v 1.4 2015/08/19 18:25:31 deraadt Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -133,6 +133,200 @@ | |||
| 133 | #include "progs.h" | 133 | #include "progs.h" |
| 134 | #include "s_apps.h" | 134 | #include "s_apps.h" |
| 135 | 135 | ||
| 136 | FUNCTION functions[] = { | ||
| 137 | |||
| 138 | /* General functions. */ | ||
| 139 | { FUNC_TYPE_GENERAL, "asn1parse", asn1parse_main }, | ||
| 140 | { FUNC_TYPE_GENERAL, "ca", ca_main }, | ||
| 141 | { FUNC_TYPE_GENERAL, "certhash", certhash_main }, | ||
| 142 | { FUNC_TYPE_GENERAL, "ciphers", ciphers_main }, | ||
| 143 | #ifndef OPENSSL_NO_CMS | ||
| 144 | { FUNC_TYPE_GENERAL, "cms", cms_main }, | ||
| 145 | #endif | ||
| 146 | { FUNC_TYPE_GENERAL, "crl2pkcs7", crl2pkcs7_main }, | ||
| 147 | { FUNC_TYPE_GENERAL, "crl", crl_main }, | ||
| 148 | { FUNC_TYPE_GENERAL, "dgst", dgst_main }, | ||
| 149 | { FUNC_TYPE_GENERAL, "enc", enc_main }, | ||
| 150 | #ifndef OPENSSL_NO_ENGINE | ||
| 151 | { FUNC_TYPE_GENERAL, "engine", engine_main }, | ||
| 152 | #endif | ||
| 153 | { FUNC_TYPE_GENERAL, "errstr", errstr_main }, | ||
| 154 | { FUNC_TYPE_GENERAL, "genpkey", genpkey_main }, | ||
| 155 | { FUNC_TYPE_GENERAL, "nseq", nseq_main }, | ||
| 156 | #ifndef OPENSSL_NO_OCSP | ||
| 157 | { FUNC_TYPE_GENERAL, "ocsp", ocsp_main }, | ||
| 158 | #endif | ||
| 159 | { FUNC_TYPE_GENERAL, "passwd", passwd_main }, | ||
| 160 | { FUNC_TYPE_GENERAL, "pkcs7", pkcs7_main }, | ||
| 161 | { FUNC_TYPE_GENERAL, "pkcs8", pkcs8_main }, | ||
| 162 | #if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1) | ||
| 163 | { FUNC_TYPE_GENERAL, "pkcs12", pkcs12_main }, | ||
| 164 | #endif | ||
| 165 | { FUNC_TYPE_GENERAL, "pkey", pkey_main }, | ||
| 166 | { FUNC_TYPE_GENERAL, "pkeyparam", pkeyparam_main }, | ||
| 167 | { FUNC_TYPE_GENERAL, "pkeyutl", pkeyutl_main }, | ||
| 168 | { FUNC_TYPE_GENERAL, "prime", prime_main }, | ||
| 169 | { FUNC_TYPE_GENERAL, "rand", rand_main }, | ||
| 170 | { FUNC_TYPE_GENERAL, "req", req_main }, | ||
| 171 | { FUNC_TYPE_GENERAL, "s_client", s_client_main }, | ||
| 172 | { FUNC_TYPE_GENERAL, "s_server", s_server_main }, | ||
| 173 | { FUNC_TYPE_GENERAL, "s_time", s_time_main }, | ||
| 174 | { FUNC_TYPE_GENERAL, "sess_id", sess_id_main }, | ||
| 175 | { FUNC_TYPE_GENERAL, "smime", smime_main }, | ||
| 176 | #ifndef OPENSSL_NO_SPEED | ||
| 177 | { FUNC_TYPE_GENERAL, "speed", speed_main }, | ||
| 178 | #endif | ||
| 179 | { FUNC_TYPE_GENERAL, "spkac", spkac_main }, | ||
| 180 | { FUNC_TYPE_GENERAL, "ts", ts_main }, | ||
| 181 | { FUNC_TYPE_GENERAL, "verify", verify_main }, | ||
| 182 | { FUNC_TYPE_GENERAL, "version", version_main }, | ||
| 183 | { FUNC_TYPE_GENERAL, "x509", x509_main }, | ||
| 184 | |||
| 185 | #ifndef OPENSSL_NO_DH | ||
| 186 | { FUNC_TYPE_GENERAL, "dh", dh_main }, | ||
| 187 | { FUNC_TYPE_GENERAL, "dhparam", dhparam_main }, | ||
| 188 | { FUNC_TYPE_GENERAL, "gendh", gendh_main }, | ||
| 189 | #endif | ||
| 190 | #ifndef OPENSSL_NO_DSA | ||
| 191 | { FUNC_TYPE_GENERAL, "dsa", dsa_main }, | ||
| 192 | { FUNC_TYPE_GENERAL, "dsaparam", dsaparam_main }, | ||
| 193 | { FUNC_TYPE_GENERAL, "gendsa", gendsa_main }, | ||
| 194 | #endif | ||
| 195 | #ifndef OPENSSL_NO_EC | ||
| 196 | { FUNC_TYPE_GENERAL, "ec", ec_main }, | ||
| 197 | { FUNC_TYPE_GENERAL, "ecparam", ecparam_main }, | ||
| 198 | #endif | ||
| 199 | #ifndef OPENSSL_NO_RSA | ||
| 200 | { FUNC_TYPE_GENERAL, "genrsa", genrsa_main }, | ||
| 201 | { FUNC_TYPE_GENERAL, "rsa", rsa_main }, | ||
| 202 | { FUNC_TYPE_GENERAL, "rsautl", rsautl_main }, | ||
| 203 | #endif | ||
| 204 | |||
| 205 | /* Message Digests. */ | ||
| 206 | #ifndef OPENSSL_NO_GOST | ||
| 207 | { FUNC_TYPE_MD, "gost-mac", dgst_main }, | ||
| 208 | { FUNC_TYPE_MD, "md_gost94", dgst_main }, | ||
| 209 | { FUNC_TYPE_MD, "streebog256", dgst_main }, | ||
| 210 | { FUNC_TYPE_MD, "streebog512", dgst_main }, | ||
| 211 | #endif | ||
| 212 | #ifndef OPENSSL_NO_MD4 | ||
| 213 | { FUNC_TYPE_MD, "md4", dgst_main }, | ||
| 214 | #endif | ||
| 215 | #ifndef OPENSSL_NO_MD5 | ||
| 216 | { FUNC_TYPE_MD, "md5", dgst_main }, | ||
| 217 | #endif | ||
| 218 | #ifndef OPENSSL_NO_RIPEMD160 | ||
| 219 | { FUNC_TYPE_MD, "ripemd160", dgst_main }, | ||
| 220 | #endif | ||
| 221 | #ifndef OPENSSL_NO_SHA | ||
| 222 | { FUNC_TYPE_MD, "sha", dgst_main }, | ||
| 223 | #endif | ||
| 224 | #ifndef OPENSSL_NO_SHA1 | ||
| 225 | { FUNC_TYPE_MD, "sha1", dgst_main }, | ||
| 226 | #endif | ||
| 227 | #ifndef OPENSSL_NO_SHA224 | ||
| 228 | { FUNC_TYPE_MD, "sha224", dgst_main }, | ||
| 229 | #endif | ||
| 230 | #ifndef OPENSSL_NO_SHA256 | ||
| 231 | { FUNC_TYPE_MD, "sha256", dgst_main }, | ||
| 232 | #endif | ||
| 233 | #ifndef OPENSSL_NO_SHA384 | ||
| 234 | { FUNC_TYPE_MD, "sha384", dgst_main }, | ||
| 235 | #endif | ||
| 236 | #ifndef OPENSSL_NO_SHA512 | ||
| 237 | { FUNC_TYPE_MD, "sha512", dgst_main }, | ||
| 238 | #endif | ||
| 239 | #ifndef OPENSSL_NO_WHIRLPOOL | ||
| 240 | { FUNC_TYPE_MD, "whirlpool", dgst_main }, | ||
| 241 | #endif | ||
| 242 | |||
| 243 | /* Ciphers. */ | ||
| 244 | { FUNC_TYPE_CIPHER, "base64", enc_main }, | ||
| 245 | #ifndef OPENSSL_NO_AES | ||
| 246 | { FUNC_TYPE_CIPHER, "aes-128-cbc", enc_main }, | ||
| 247 | { FUNC_TYPE_CIPHER, "aes-128-ecb", enc_main }, | ||
| 248 | { FUNC_TYPE_CIPHER, "aes-192-cbc", enc_main }, | ||
| 249 | { FUNC_TYPE_CIPHER, "aes-192-ecb", enc_main }, | ||
| 250 | { FUNC_TYPE_CIPHER, "aes-256-cbc", enc_main }, | ||
| 251 | { FUNC_TYPE_CIPHER, "aes-256-ecb", enc_main }, | ||
| 252 | #endif | ||
| 253 | #ifndef OPENSSL_NO_BF | ||
| 254 | { FUNC_TYPE_CIPHER, "bf", enc_main }, | ||
| 255 | { FUNC_TYPE_CIPHER, "bf-cbc", enc_main }, | ||
| 256 | { FUNC_TYPE_CIPHER, "bf-ecb", enc_main }, | ||
| 257 | { FUNC_TYPE_CIPHER, "bf-cfb", enc_main }, | ||
| 258 | { FUNC_TYPE_CIPHER, "bf-ofb", enc_main }, | ||
| 259 | #endif | ||
| 260 | #ifndef OPENSSL_NO_CAMELLIA | ||
| 261 | { FUNC_TYPE_CIPHER, "camellia-128-cbc", enc_main }, | ||
| 262 | { FUNC_TYPE_CIPHER, "camellia-128-ecb", enc_main }, | ||
| 263 | { FUNC_TYPE_CIPHER, "camellia-192-cbc", enc_main }, | ||
| 264 | { FUNC_TYPE_CIPHER, "camellia-192-ecb", enc_main }, | ||
| 265 | { FUNC_TYPE_CIPHER, "camellia-256-cbc", enc_main }, | ||
| 266 | { FUNC_TYPE_CIPHER, "camellia-256-ecb", enc_main }, | ||
| 267 | #endif | ||
| 268 | #ifndef OPENSSL_NO_CAST | ||
| 269 | { FUNC_TYPE_CIPHER, "cast", enc_main }, | ||
| 270 | { FUNC_TYPE_CIPHER, "cast5-cbc", enc_main }, | ||
| 271 | { FUNC_TYPE_CIPHER, "cast5-ecb", enc_main }, | ||
| 272 | { FUNC_TYPE_CIPHER, "cast5-cfb", enc_main }, | ||
| 273 | { FUNC_TYPE_CIPHER, "cast5-ofb", enc_main }, | ||
| 274 | { FUNC_TYPE_CIPHER, "cast-cbc", enc_main }, | ||
| 275 | #endif | ||
| 276 | #ifndef OPENSSL_NO_CHACHA | ||
| 277 | { FUNC_TYPE_CIPHER, "chacha", enc_main }, | ||
| 278 | #endif | ||
| 279 | #ifndef OPENSSL_NO_DES | ||
| 280 | { FUNC_TYPE_CIPHER, "des", enc_main }, | ||
| 281 | { FUNC_TYPE_CIPHER, "des3", enc_main }, | ||
| 282 | { FUNC_TYPE_CIPHER, "desx", enc_main }, | ||
| 283 | { FUNC_TYPE_CIPHER, "des-ecb", enc_main }, | ||
| 284 | { FUNC_TYPE_CIPHER, "des-ede", enc_main }, | ||
| 285 | { FUNC_TYPE_CIPHER, "des-ede3", enc_main }, | ||
| 286 | { FUNC_TYPE_CIPHER, "des-cbc", enc_main }, | ||
| 287 | { FUNC_TYPE_CIPHER, "des-ede-cbc", enc_main }, | ||
| 288 | { FUNC_TYPE_CIPHER, "des-ede3-cbc", enc_main }, | ||
| 289 | { FUNC_TYPE_CIPHER, "des-cfb", enc_main }, | ||
| 290 | { FUNC_TYPE_CIPHER, "des-ede-cfb", enc_main }, | ||
| 291 | { FUNC_TYPE_CIPHER, "des-ede3-cfb", enc_main }, | ||
| 292 | { FUNC_TYPE_CIPHER, "des-ofb", enc_main }, | ||
| 293 | { FUNC_TYPE_CIPHER, "des-ede-ofb", enc_main }, | ||
| 294 | { FUNC_TYPE_CIPHER, "des-ede3-ofb", enc_main }, | ||
| 295 | #endif | ||
| 296 | #ifndef OPENSSL_NO_IDEA | ||
| 297 | { FUNC_TYPE_CIPHER, "idea", enc_main }, | ||
| 298 | { FUNC_TYPE_CIPHER, "idea-cbc", enc_main }, | ||
| 299 | { FUNC_TYPE_CIPHER, "idea-ecb", enc_main }, | ||
| 300 | { FUNC_TYPE_CIPHER, "idea-cfb", enc_main }, | ||
| 301 | { FUNC_TYPE_CIPHER, "idea-ofb", enc_main }, | ||
| 302 | #endif | ||
| 303 | #ifndef OPENSSL_NO_RC2 | ||
| 304 | { FUNC_TYPE_CIPHER, "rc2", enc_main }, | ||
| 305 | { FUNC_TYPE_CIPHER, "rc2-cbc", enc_main }, | ||
| 306 | { FUNC_TYPE_CIPHER, "rc2-ecb", enc_main }, | ||
| 307 | { FUNC_TYPE_CIPHER, "rc2-cfb", enc_main }, | ||
| 308 | { FUNC_TYPE_CIPHER, "rc2-ofb", enc_main }, | ||
| 309 | { FUNC_TYPE_CIPHER, "rc2-64-cbc", enc_main }, | ||
| 310 | { FUNC_TYPE_CIPHER, "rc2-40-cbc", enc_main }, | ||
| 311 | #endif | ||
| 312 | #ifndef OPENSSL_NO_RC4 | ||
| 313 | { FUNC_TYPE_CIPHER, "rc4", enc_main }, | ||
| 314 | { FUNC_TYPE_CIPHER, "rc4-40", enc_main }, | ||
| 315 | #endif | ||
| 316 | #ifndef OPENSSL_NO_RC5 | ||
| 317 | { FUNC_TYPE_CIPHER, "rc5", enc_main }, | ||
| 318 | { FUNC_TYPE_CIPHER, "rc5-cbc", enc_main }, | ||
| 319 | { FUNC_TYPE_CIPHER, "rc5-ecb", enc_main }, | ||
| 320 | { FUNC_TYPE_CIPHER, "rc5-cfb", enc_main }, | ||
| 321 | { FUNC_TYPE_CIPHER, "rc5-ofb", enc_main }, | ||
| 322 | #endif | ||
| 323 | #ifdef ZLIB | ||
| 324 | { FUNC_TYPE_CIPHER, "zlib", enc_main }, | ||
| 325 | #endif | ||
| 326 | |||
| 327 | { 0, NULL, NULL } | ||
| 328 | }; | ||
| 329 | |||
| 136 | static void openssl_startup(void); | 330 | static void openssl_startup(void); |
| 137 | static void openssl_shutdown(void); | 331 | static void openssl_shutdown(void); |
| 138 | 332 | ||
