*) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7
+) applies to 0.9.7 only
+ +) Add symmetric cipher support to ENGINE. Expect the API to change!
+ [Ben Laurie]
+
+) New CRL functions: X509_CRL_set_version(), X509_CRL_set_issuer_name()
X509_CRL_set_lastUpdate(), X509_CRL_set_nextUpdate(), X509_CRL_sort(),
X509_REVOKED_set_serialNumber(), and X509_REVOKED_set_revocationDate().
+Output of `Configure TABLE':
*** BC-16
$cc = bcc
*** CygWin32
$cc = gcc
-$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
+$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -mcpu=i486 -Wall
$unistd =
$thread_cflag =
$sys_id = CYGWIN32
*** FreeBSD
$cc = gcc
-$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
+$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -mcpu=i486 -Wall
$unistd =
$thread_cflag = (unknown)
$sys_id =
*** FreeBSD-elf
$cc = gcc
-$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
+$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -mcpu=i486 -Wall
$unistd =
$thread_cflag = -pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE
$sys_id =
*** Mingw32
$cc = gcc
-$cflags = -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
+$cflags = -DL_ENDIAN -fomit-frame-pointer -O3 -mcpu=i486 -Wall
$unistd =
$thread_cflag =
$sys_id =
*** NetBSD-x86
$cc = gcc
-$cflags = -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall
+$cflags = -DTERMIOS -O3 -fomit-frame-pointer -mcpu=i486 -Wall
$unistd =
$thread_cflag = (unknown)
$sys_id =
*** OpenBSD-x86
$cc = gcc
-$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486
+$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -mcpu=i486
$unistd =
$thread_cflag = (unknown)
$sys_id =
*** alpha-cc
$cc = cc
-$cflags = -std1 -tune host -O4 -readonly_strings
+$cflags = -std1 -tune host -fast -readonly_strings
$unistd =
-$thread_cflag = (unknown)
+$thread_cflag = -pthread
$sys_id =
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
+$lflags = SIXTY_FOUR_BIT_LONG RC4_CHUNK
+$bn_ops =
$bn_obj =
$des_obj =
$bf_obj =
$cast_obj =
$rc4_obj =
$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= tru64-shared
-$shared_cflag =
-$shared_extension = .so
+$rc5_obj = dlfcn
+$dso_scheme = tru64-shared
+$shared_target=
+$shared_cflag = .so
+$shared_extension =
+$ranlib =
+
+*** alpha-cc-rpath
+$cc = cc
+$cflags = -std1 -tune host -fast -readonly_strings
+$unistd =
+$thread_cflag = -pthread
+$sys_id =
+$lflags = SIXTY_FOUR_BIT_LONG RC4_CHUNK
+$bn_ops =
+$bn_obj =
+$des_obj =
+$bf_obj =
+$md5_obj =
+$sha1_obj =
+$cast_obj =
+$rc4_obj =
+$rmd160_obj =
+$rc5_obj = dlfcn
+$dso_scheme = tru64-shared-rpath
+$shared_target=
+$shared_cflag = .so
+$shared_extension =
$ranlib =
*** alpha-gcc
$unistd =
$thread_cflag = (unknown)
$sys_id =
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1
+$lflags = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1
+$bn_ops =
$bn_obj =
$des_obj =
$bf_obj =
$cast_obj =
$rc4_obj =
$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= tru64-shared
-$shared_cflag =
-$shared_extension = .so
+$rc5_obj = dlfcn
+$dso_scheme = alpha-osf1-shared
+$shared_target=
+$shared_cflag = .so
+$shared_extension =
$ranlib =
*** alpha164-cc
$cc = cc
$cflags = -std1 -tune host -fast -readonly_strings
$unistd =
+$thread_cflag = -pthread
+$sys_id =
+$lflags = SIXTY_FOUR_BIT_LONG RC4_CHUNK
+$bn_ops =
+$bn_obj =
+$des_obj =
+$bf_obj =
+$md5_obj =
+$sha1_obj =
+$cast_obj =
+$rc4_obj =
+$rmd160_obj =
+$rc5_obj = dlfcn
+$dso_scheme = tru64-shared
+$shared_target=
+$shared_cflag = .so
+$shared_extension =
+$ranlib =
+
+*** alphaold-cc
+$cc = cc
+$cflags = -std1 -tune host -O4 -readonly_strings
+$unistd =
$thread_cflag = (unknown)
$sys_id =
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
+$lflags = SIXTY_FOUR_BIT_LONG RC4_CHUNK
+$bn_ops =
$bn_obj =
$des_obj =
$bf_obj =
$cast_obj =
$rc4_obj =
$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= tru64-shared
-$shared_cflag =
-$shared_extension = .so
+$rc5_obj = dlfcn
+$dso_scheme = alpha-osf1-shared
+$shared_target=
+$shared_cflag = .so
+$shared_extension =
$ranlib =
*** bsdi-elf-gcc
$cc = gcc
-$cflags = -DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
+$cflags = -DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -mcpu=i486 -Wall
$unistd =
$thread_cflag = (unknown)
$sys_id =
*** bsdi-gcc
$cc = gcc
-$cflags = -O3 -ffast-math -DL_ENDIAN -DPERL5 -m486
+$cflags = -O3 -ffast-math -DL_ENDIAN -DPERL5 -mcpu=i486
$unistd =
$thread_cflag = (unknown)
$sys_id =
*** debug-bodo
$cc = gcc
-$cflags = -DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -m486 -pedantic -Wshadow -Wall
+$cflags = -DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -mcpu=i486 -pedantic -Wshadow -Wall
$unistd =
$thread_cflag = -D_REENTRANT
$sys_id =
*** debug-levitte-linux-elf
$cc = gcc
-$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -Wno-long-long -pipe
+$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -Wno-long-long -pipe
$unistd =
$thread_cflag = -D_REENTRANT
$sys_id =
*** debug-levitte-linux-noasm
$cc = gcc
-$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -Wno-long-long -pipe
+$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -Wno-long-long -pipe
$unistd =
$thread_cflag = -D_REENTRANT
$sys_id =
*** debug-linux-elf
$cc = gcc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
+$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=i486 -Wall
$unistd =
$thread_cflag = -D_REENTRANT
$sys_id =
*** debug-linux-elf-noefence
$cc = gcc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
+$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=i486 -Wall
$unistd =
$thread_cflag = -D_REENTRANT
$sys_id =
*** debug-steve
$cc = gcc
-$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -m486 -pedantic -Wall -Werror -Wshadow -pipe
+$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wall -Werror -Wshadow -pipe
$unistd =
$thread_cflag = -D_REENTRANT
$sys_id =
*** debug-ulf
$cc = gcc
-$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe
+$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -mcpu=i486 -Wall -Werror -Wshadow -pipe
$unistd =
$thread_cflag = -D_REENTRANT
$sys_id =
*** hurd-x86
$cc = gcc
-$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall
+$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -mcpu=i486 -Wall
$unistd =
$thread_cflag = -D_REENTRANT
$sys_id =
*** linux-aout
$cc = gcc
-$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall
+$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=i486 -Wall
$unistd =
$thread_cflag = (unknown)
$sys_id =
*** linux-elf
$cc = gcc
-$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall
+$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=i486 -Wall
$unistd =
$thread_cflag = -D_REENTRANT
$sys_id =
*** solaris-x86-gcc
$cc = gcc
-$cflags = -O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM
+$cflags = -O3 -fomit-frame-pointer -mcpu=i486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM
$unistd =
$thread_cflag = -D_REENTRANT
$sys_id =
BIO_printf(err,"can't use that engine\n");
return NULL;
}
+
+ ENGINE_load_engine_ciphers(e);
+
BIO_printf(err,"engine \"%s\" set.\n", engine);
+
/* Free our "structural" reference. */
ENGINE_free(e);
}
return;
}
-static int append_buf(char **buf, char *s, int *size, int step)
+static int append_buf(char **buf, const char *s, int *size, int step)
{
int l = strlen(s);
{
int cap_size = 256;
char *cap_buf = NULL;
+ int k,n;
if (ENGINE_get_RSA(e) != NULL
&& !append_buf(&cap_buf, "RSA",
&cap_size, 256))
goto end;
+ n=ENGINE_cipher_num(e);
+ for(k=0 ; k < n ; ++k)
+ if(!append_buf(&cap_buf,
+ OBJ_nid2sn(ENGINE_get_cipher(e, k)->nid),
+ &cap_size, 256))
+ goto end;
+
if (cap_buf && (*cap_buf != '\0'))
BIO_printf(bio_out, " [%s]", cap_buf);
cfb_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
cfb_enc.o: ../../include/openssl/opensslconf.h cfb_enc.c des_locl.h
des_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
-des_enc.o: ../../include/openssl/opensslconf.h des_enc.c des_locl.h des_locl.h
-des_enc.o: ncbc_enc.c
+des_enc.o: ../../include/openssl/opensslconf.h des_enc.c des_locl.h ncbc_enc.c
ecb3_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
ecb3_enc.o: ../../include/openssl/opensslconf.h des_locl.h ecb3_enc.c
ecb_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
LIB=$(TOP)/libcrypto.a
LIBSRC= engine_err.c engine_lib.c engine_list.c engine_all.c engine_openssl.c \
- hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c hw_ubsec.c
+ engine_evp.c \
+ hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c hw_ubsec.c \
+ hw_openbsd_dev_crypto.c
LIBOBJ= engine_err.o engine_lib.o engine_list.o engine_all.o engine_openssl.o \
- hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o hw_ubsec.o
+ engine_evp.o \
+ hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o hw_ubsec.o \
+ hw_openbsd_dev_crypto.o
SRC= $(LIBSRC)
engine_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
engine_err.o: ../../include/openssl/types.h ../../include/openssl/ui.h
engine_err.o: engine_err.c
+engine_evp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+engine_evp.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
+engine_evp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+engine_evp.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
+engine_evp.o: ../../include/openssl/evp.h ../../include/openssl/obj_mac.h
+engine_evp.o: ../../include/openssl/objects.h
+engine_evp.o: ../../include/openssl/opensslconf.h
+engine_evp.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
+engine_evp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
+engine_evp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
+engine_evp.o: ../../include/openssl/types.h ../../include/openssl/ui.h
+engine_evp.o: engine_evp.c engine_int.h
engine_lib.o: ../../e_os.h ../../include/openssl/asn1.h
engine_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
engine_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
hw_nuron.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
hw_nuron.o: ../../include/openssl/types.h ../../include/openssl/ui.h
hw_nuron.o: ../cryptlib.h hw_nuron.c
+hw_openbsd_dev_crypto.o: ../../include/openssl/asn1.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/crypto.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/e_os2.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/engine.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/evp.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/obj_mac.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/objects.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/opensslconf.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/opensslv.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/rand.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/rsa.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/safestack.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/stack.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/symhacks.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/types.h
+hw_openbsd_dev_crypto.o: ../../include/openssl/ui.h engine_int.h
+hw_openbsd_dev_crypto.o: hw_openbsd_dev_crypto.c
hw_ubsec.o: ../../e_os.h ../../include/openssl/asn1.h
hw_ubsec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
hw_ubsec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
void ENGINE_load_atalla(void);
void ENGINE_load_nuron(void);
void ENGINE_load_ubsec(void);
+void ENGINE_load_openbsd_dev_crypto(void);
void ENGINE_load_builtin_engines(void);
+/* Load all the currently known ciphers from all engines */
+void ENGINE_load_ciphers(void);
+
/* Send parametrised control commands to the engine. The possibilities to send
* down an integer, a pointer to data or a function pointer are provided. Any of
* the parameters may or may not be NULL, depending on the command number. In
int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f);
int ENGINE_set_flags(ENGINE *e, int flags);
int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns);
+int ENGINE_add_cipher(ENGINE *e,const EVP_CIPHER *c);
/* Copies across all ENGINE methods and pointers. NB: This does *not* change
* reference counts however. */
int ENGINE_cpy(ENGINE *dest, const ENGINE *src);
const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e);
const DH_METHOD *ENGINE_get_DH(const ENGINE *e);
const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e);
+int ENGINE_cipher_num(const ENGINE *e);
+const EVP_CIPHER *ENGINE_get_cipher(const ENGINE *e, int n);
BN_MOD_EXP ENGINE_get_BN_mod_exp(const ENGINE *e);
BN_MOD_EXP_CRT ENGINE_get_BN_mod_exp_crt(const ENGINE *e);
ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e);
* no need to call both (although no harm is done). */
int ENGINE_clear_defaults(void);
+/* Instruct an engine to load any EVP ciphers it knows of */
+/* XXX make this work via defaults? */
+void ENGINE_load_engine_ciphers(ENGINE *e);
+
/* Obligatory error function. */
void ERR_load_ENGINE_strings(void);
#endif /* !OPENSSL_NO_HW */
}
+void ENGINE_load_openbsd_dev_crypto(void)
+ {
+#ifndef OPENSSL_NO_HW
+# ifdef OPENSSL_OPENBSD_DEV_CRYPTO
+ engine_add(ENGINE_openbsd_dev_crypto());
+# endif
+#endif /* !OPENSSL_NO_HW */
+ }
+
void ENGINE_load_builtin_engines(void)
{
static int done=0;
ENGINE_load_atalla();
ENGINE_load_nuron();
ENGINE_load_ubsec();
+ ENGINE_load_openbsd_dev_crypto();
}
--- /dev/null
+/* Written by Ben Laurie <ben@algroup.co.uk> August 2001 */
+/* ====================================================================
+ * Copyright (c) 2000 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * licensing@OpenSSL.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+#include <openssl/engine.h>
+#include <openssl/evp.h>
+#include "engine_int.h"
+#include <string.h>
+
+int ENGINE_add_cipher(ENGINE *e,const EVP_CIPHER *c)
+ {
+ ENGINE_EVP_CIPHER *p;
+
+ p=OPENSSL_malloc(sizeof *p);
+ p->cipher=c;
+
+ if(!e->ciphers)
+ e->ciphers=sk_ENGINE_EVP_CIPHER_new_null();
+ sk_ENGINE_EVP_CIPHER_push(e->ciphers,p);
+
+ return 1;
+ }
+
+void ENGINE_free_engine_cipher(ENGINE_EVP_CIPHER *p)
+ { OPENSSL_free(p); }
+
+int ENGINE_cipher_num(const ENGINE *e)
+ { return sk_ENGINE_EVP_CIPHER_num(e->ciphers); }
+
+const EVP_CIPHER *ENGINE_get_cipher(const ENGINE *e, int n)
+ { return sk_ENGINE_EVP_CIPHER_value(e->ciphers, n)->cipher; }
+
+void ENGINE_load_ciphers()
+ {
+ ENGINE *e;
+
+ for(e=ENGINE_get_first() ; e ; e=ENGINE_get_next(e))
+ ENGINE_load_engine_ciphers(e);
+ }
+
+void ENGINE_load_engine_ciphers(ENGINE *e)
+ {
+ int n;
+
+ for(n=0 ; n < sk_ENGINE_EVP_CIPHER_num(e->ciphers) ; ++n)
+ EVP_add_cipher(sk_ENGINE_EVP_CIPHER_value(e->ciphers,n)->cipher);
+ }
#endif
+typedef struct engine_evp_cipher_st
+ {
+ const EVP_CIPHER *cipher;
+ } ENGINE_EVP_CIPHER;
+
+DECLARE_STACK_OF(ENGINE_EVP_CIPHER)
+
+void ENGINE_free_engine_cipher(ENGINE_EVP_CIPHER *p);
+
/* NB: Bitwise OR-able values for the "flags" variable in ENGINE are now exposed
* in engine.h. */
const DSA_METHOD *dsa_meth;
const DH_METHOD *dh_meth;
const RAND_METHOD *rand_meth;
+
BN_MOD_EXP bn_mod_exp;
BN_MOD_EXP_CRT bn_mod_exp_crt;
ENGINE_GEN_INT_FUNC_PTR init;
ENGINE_CTRL_FUNC_PTR ctrl;
ENGINE_LOAD_KEY_PTR load_privkey;
ENGINE_LOAD_KEY_PTR load_pubkey;
+
+ STACK_OF(ENGINE_EVP_CIPHER) *ciphers;
+
const ENGINE_CMD_DEFN *cmd_defns;
int flags;
/* reference count on the structure itself */
ENGINE *ENGINE_ubsec();
#endif /* !OPENSSL_NO_HW_UBSEC */
+#ifdef OPENSSL_OPENBSD_DEV_CRYPTO
+ENGINE *ENGINE_openbsd_dev_crypto(void);
+#endif
+
#endif /* !OPENSSL_NO_HW */
#ifdef __cplusplus
abort();
}
#endif
+ sk_ENGINE_EVP_CIPHER_pop_free(e->ciphers,ENGINE_free_engine_cipher);
CRYPTO_free_ex_data(engine_ex_data_stack, e, &e->ex_data);
OPENSSL_free(e);
return 1;
--- /dev/null
+/* Written by Ben Laurie <ben@algroup.co.uk> August 2001 */
+/* ====================================================================
+ * Copyright (c) 1999 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * licensing@OpenSSL.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+#include <openssl/engine.h>
+#include <openssl/evp.h>
+#include "engine_int.h"
+
+static void load_ciphers(ENGINE *e)
+ {
+ ENGINE_add_cipher(e,EVP_dev_crypto_des_ede3_cbc());
+ }
+
+ENGINE *ENGINE_openbsd_dev_crypto(void)
+ {
+ ENGINE *engine=ENGINE_new();
+
+ if(!ENGINE_set_id(engine,"openbsd_dev_crypto")
+ || !ENGINE_set_name(engine,"OpenBSD /dev/crypto"))
+ {
+ ENGINE_free(engine);
+ return NULL;
+ }
+ load_ciphers(engine);
+
+ return engine;
+ }
+
names.o: ../../include/openssl/symhacks.h ../../include/openssl/types.h
names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
names.o: ../cryptlib.h names.c
+openbsd_hw.o: openbsd_hw.c
p5_crpt.o: ../../e_os.h ../../include/openssl/asn1.h
p5_crpt.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
p5_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
EVP_add_cipher_alias(SN_des_cbc,"DES");
EVP_add_cipher_alias(SN_des_cbc,"des");
EVP_add_cipher(EVP_des_ede_cbc());
-# ifdef OPENSSL_OPENBSD_DEV_CRYPTO
- EVP_add_cipher(EVP_dev_crypto_des_ede3_cbc());
-# else
EVP_add_cipher(EVP_des_ede3_cbc());
-# endif
EVP_add_cipher_alias(SN_des_ede3_cbc,"DES3");
EVP_add_cipher_alias(SN_des_ede3_cbc,"des3");
static int dev_crypto_cleanup(EVP_CIPHER_CTX *ctx)
{
- fprintf(stderr,"clean up session %d\n",data(ctx)->ses);
if(ioctl(fd,CIOCFSESSION,&data(ctx)->ses) == -1)
err("CIOCFSESSION failed");
ctx->cipher=EVP_des_ede3_cbc();
return ctx->cipher->init(ctx,key,iv,enc);
}
- fprintf(stderr,"created session %d\n",data(ctx)->ses);
return 1;
}
#define sk_DIST_POINT_pop(st) SKM_sk_pop(DIST_POINT, (st))
#define sk_DIST_POINT_sort(st) SKM_sk_sort(DIST_POINT, (st))
+#define sk_ENGINE_EVP_CIPHER_new(st) SKM_sk_new(ENGINE_EVP_CIPHER, (st))
+#define sk_ENGINE_EVP_CIPHER_new_null() SKM_sk_new_null(ENGINE_EVP_CIPHER)
+#define sk_ENGINE_EVP_CIPHER_free(st) SKM_sk_free(ENGINE_EVP_CIPHER, (st))
+#define sk_ENGINE_EVP_CIPHER_num(st) SKM_sk_num(ENGINE_EVP_CIPHER, (st))
+#define sk_ENGINE_EVP_CIPHER_value(st, i) SKM_sk_value(ENGINE_EVP_CIPHER, (st), (i))
+#define sk_ENGINE_EVP_CIPHER_set(st, i, val) SKM_sk_set(ENGINE_EVP_CIPHER, (st), (i), (val))
+#define sk_ENGINE_EVP_CIPHER_zero(st) SKM_sk_zero(ENGINE_EVP_CIPHER, (st))
+#define sk_ENGINE_EVP_CIPHER_push(st, val) SKM_sk_push(ENGINE_EVP_CIPHER, (st), (val))
+#define sk_ENGINE_EVP_CIPHER_unshift(st, val) SKM_sk_unshift(ENGINE_EVP_CIPHER, (st), (val))
+#define sk_ENGINE_EVP_CIPHER_find(st, val) SKM_sk_find(ENGINE_EVP_CIPHER, (st), (val))
+#define sk_ENGINE_EVP_CIPHER_delete(st, i) SKM_sk_delete(ENGINE_EVP_CIPHER, (st), (i))
+#define sk_ENGINE_EVP_CIPHER_delete_ptr(st, ptr) SKM_sk_delete_ptr(ENGINE_EVP_CIPHER, (st), (ptr))
+#define sk_ENGINE_EVP_CIPHER_insert(st, val, i) SKM_sk_insert(ENGINE_EVP_CIPHER, (st), (val), (i))
+#define sk_ENGINE_EVP_CIPHER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ENGINE_EVP_CIPHER, (st), (cmp))
+#define sk_ENGINE_EVP_CIPHER_dup(st) SKM_sk_dup(ENGINE_EVP_CIPHER, st)
+#define sk_ENGINE_EVP_CIPHER_pop_free(st, free_func) SKM_sk_pop_free(ENGINE_EVP_CIPHER, (st), (free_func))
+#define sk_ENGINE_EVP_CIPHER_shift(st) SKM_sk_shift(ENGINE_EVP_CIPHER, (st))
+#define sk_ENGINE_EVP_CIPHER_pop(st) SKM_sk_pop(ENGINE_EVP_CIPHER, (st))
+#define sk_ENGINE_EVP_CIPHER_sort(st) SKM_sk_sort(ENGINE_EVP_CIPHER, (st))
+
#define sk_GENERAL_NAME_new(st) SKM_sk_new(GENERAL_NAME, (st))
#define sk_GENERAL_NAME_new_null() SKM_sk_new_null(GENERAL_NAME)
#define sk_GENERAL_NAME_free(st) SKM_sk_free(GENERAL_NAME, (st))
x509_vfy.o: ../../include/openssl/symhacks.h ../../include/openssl/types.h
x509_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
x509_vfy.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_vfy.c
+x509cset.o: ../../e_os.h ../../include/openssl/asn1.h
+x509cset.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+x509cset.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
+x509cset.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+x509cset.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+x509cset.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
+x509cset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
+x509cset.o: ../../include/openssl/opensslconf.h
+x509cset.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
+x509cset.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
+x509cset.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
+x509cset.o: ../../include/openssl/symhacks.h ../../include/openssl/types.h
+x509cset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
+x509cset.o: ../cryptlib.h x509cset.c
x509name.o: ../../e_os.h ../../include/openssl/asn1.h
x509name.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
x509name.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
EVP_MD_CTX_cleanup 3077 EXIST::FUNCTION:
EVP_MD_CTX_destroy 3078 EXIST::FUNCTION:
des_release_key 3079 EXIST::FUNCTION:DES
+ENGINE_load_openbsd_dev_crypto 3080 EXIST::FUNCTION:
+ENGINE_add_all_evp 3081 EXIST::FUNCTION:
+ENGINE_add_evp_cipher 3082 EXIST::FUNCTION:
+ENGINE_load_evp 3083 EXIST::FUNCTION: