int MAIN(int argc, char **argv)
{
-#ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
-#endif
int ret=1;
DSA *dsa=NULL;
int i,badops=0;
*
*/
-#ifndef OPENSSL_NO_ENGINE
#include <stdio.h>
#include <stdlib.h>
#endif
#include "apps.h"
#include <openssl/err.h>
+#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
#include <openssl/ssl.h>
ameth = EVP_PKEY_asn1_find_str(&tmpeng, algname, -1);
+#ifndef OPENSSL_NO_ENGINE
if (!ameth && e)
ameth = ENGINE_get_pkey_asn1_meth_str(e, algname, -1);
+#endif
if (!ameth)
{
int MAIN(int argc, char **argv)
{
- ENGINE *e = NULL;
char **args, *infile = NULL, *outfile = NULL;
BIO *in = NULL, *out = NULL;
int text = 0, noout = 0;
EVP_PKEY *pkey=NULL;
int badarg = 0;
#ifndef OPENSSL_NO_ENGINE
+ ENGINE *e = NULL;
char *engine=NULL;
#endif
int ret = 1;
if (badarg)
{
+#ifndef OPENSSL_NO_ENGINE
bad:
+#endif
BIO_printf(bio_err, "Usage pkeyparam [options]\n");
BIO_printf(bio_err, "where options are\n");
BIO_printf(bio_err, "-in file input file\n");
#ifndef OPENSSL_NO_ENGINE
char *engine_id=NULL;
char *ssl_client_engine_id=NULL;
- ENGINE *e=NULL, *ssl_client_engine=NULL;
+ ENGINE *ssl_client_engine=NULL;
#endif
+ ENGINE *e=NULL;
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_BEOS_R5)
struct timeval tv;
#if defined(OPENSSL_SYS_BEOS_R5)
int state=0;
const SSL_METHOD *meth=NULL;
int socket_type=SOCK_STREAM;
-#ifndef OPENSSL_NO_ENGINE
ENGINE *e=NULL;
-#endif
char *inrand=NULL;
int s_cert_format = FORMAT_PEM, s_key_format = FORMAT_PEM;
char *passarg = NULL, *pass = NULL;
/* Setting serial number provider callback. */
if (!TS_CONF_set_serial(conf, section, serial_cb, resp_ctx)) goto end;
-
+#ifndef OPENSSL_NO_ENGINE
/* Setting default OpenSSL engine. */
if (!TS_CONF_set_crypto_device(conf, section, engine)) goto end;
+#endif
/* Setting TSA signer certificate. */
if (!TS_CONF_set_signer_cert(conf, section, signer, resp_ctx)) goto end;
#include <stdio.h>
#include <string.h>
+#include <openssl/e_os2.h>
#ifdef OPENSSL_NO_ENGINE
int main(int argc, char *argv[])
return(0);
}
#else
-#include <openssl/e_os2.h>
#include <openssl/buffer.h>
#include <openssl/crypto.h>
#include <openssl/engine.h>
#include <openssl/crypto.h>
#include "cryptlib.h"
#include <openssl/pem.h>
+#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
+#endif
#include <openssl/ts.h>
/* Macro definitions for the configuration file. */
return ret;
}
+#ifndef OPENSSL_NO_ENGINE
+
int TS_CONF_set_crypto_device(CONF *conf, const char *section,
const char *device)
{
return ret;
}
+#endif
+
int TS_CONF_set_signer_cert(CONF *conf, const char *section,
const char *cert, TS_RESP_CTX *ctx)
{
#include <stdio.h>
#include <openssl/objects.h>
#include <openssl/comp.h>
+#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
+#endif
#include "ssl_locl.h"
#define SSL_ENC_DES_IDX 0
/* Search for public key algorithm with given name and
* return its pkey_id if it is available. Otherwise return 0
*/
+#ifdef OPENSSL_NO_ENGINE
+
static int get_optional_pkey_id(const char *pkey_name)
{
const EVP_PKEY_ASN1_METHOD *ameth;
- ENGINE *tmpeng = NULL;
int pkey_id=0;
- ameth = EVP_PKEY_asn1_find_str(&tmpeng,pkey_name,-1);
+ ameth = EVP_PKEY_asn1_find_str(NULL,pkey_name,-1);
if (ameth)
{
EVP_PKEY_asn1_get0_info(&pkey_id, NULL,NULL,NULL,NULL,ameth);
}
- if (tmpeng) ENGINE_finish(tmpeng);
return pkey_id;
}
+#else
+
+static int get_optional_pkey_id(const char *pkey_name)
+ {
+ const EVP_PKEY_ASN1_METHOD *ameth;
+ ENGINE *tmpeng = NULL;
+ int pkey_id=0;
+ ameth = EVP_PKEY_asn1_find_str(&tmpeng,pkey_name,-1);
+ if (ameth)
+ {
+ EVP_PKEY_asn1_get0_info(&pkey_id, NULL,NULL,NULL,NULL,ameth);
+ }
+ if (tmpeng) ENGINE_finish(tmpeng);
+ return pkey_id;
+ }
+
+#endif
+
void ssl_load_ciphers(void)
{
ssl_cipher_methods[SSL_ENC_DES_IDX]=