Commit 5271ebd9 authored by Ulf Möller's avatar Ulf Möller
Browse files

More no-xxx option tweaks.

parent 5676d8cb
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -4,6 +4,9 @@


 Changes between 0.9.3a and 0.9.4
 Changes between 0.9.3a and 0.9.4


  *) Fix problems with no-hmac etc.
     [Ulf Möller, pointed out by Brian Wellington <bwelling@tislabs.com>]

  *) New functions RSA_get_default_method(), RSA_set_method() and
  *) New functions RSA_get_default_method(), RSA_set_method() and
     RSA_get_method(). These allows replacement of RSA_METHODs without having
     RSA_get_method(). These allows replacement of RSA_METHODs without having
     to mess around with the internals of an RSA structure.
     to mess around with the internals of an RSA structure.
+4 −2
Original line number Original line Diff line number Diff line
@@ -123,9 +123,11 @@
#endif
#endif
#ifndef NO_MD5
#ifndef NO_MD5
#include <openssl/md5.h>
#include <openssl/md5.h>
#endif
#ifndef NO_HMAC
#include <openssl/hmac.h>
#include <openssl/hmac.h>
#include <openssl/evp.h>
#endif
#endif
#include <openssl/evp.h>
#ifndef NO_SHA
#ifndef NO_SHA
#include <openssl/sha.h>
#include <openssl/sha.h>
#endif
#endif
@@ -756,7 +758,7 @@ int MAIN(int argc, char **argv)
		}
		}
#endif
#endif


#ifndef NO_MD5
#if !defined(NO_MD5) && !defined(NO_HMAC)
	if (doit[D_HMAC])
	if (doit[D_HMAC])
		{
		{
		HMAC_CTX hctx;
		HMAC_CTX hctx;
+14 −0
Original line number Original line Diff line number Diff line
@@ -68,22 +68,36 @@
void PKCS5_PBE_add(void)
void PKCS5_PBE_add(void)
{
{
#ifndef NO_DES
#ifndef NO_DES
#  ifndef NO_MD5
EVP_PBE_alg_add(NID_pbeWithMD5AndDES_CBC, EVP_des_cbc(), EVP_md5(),
EVP_PBE_alg_add(NID_pbeWithMD5AndDES_CBC, EVP_des_cbc(), EVP_md5(),
							 PKCS5_PBE_keyivgen);
							 PKCS5_PBE_keyivgen);
#  endif
#  ifndef NO_MD2
EVP_PBE_alg_add(NID_pbeWithMD2AndDES_CBC, EVP_des_cbc(), EVP_md2(),
EVP_PBE_alg_add(NID_pbeWithMD2AndDES_CBC, EVP_des_cbc(), EVP_md2(),
							 PKCS5_PBE_keyivgen);
							 PKCS5_PBE_keyivgen);
#  endif
#  ifndef NO_SHA
EVP_PBE_alg_add(NID_pbeWithSHA1AndDES_CBC, EVP_des_cbc(), EVP_sha1(),
EVP_PBE_alg_add(NID_pbeWithSHA1AndDES_CBC, EVP_des_cbc(), EVP_sha1(),
							 PKCS5_PBE_keyivgen);
							 PKCS5_PBE_keyivgen);
#  endif
#  endif
#endif
#ifndef NO_RC2
#ifndef NO_RC2
#  ifndef NO_MD5
EVP_PBE_alg_add(NID_pbeWithMD5AndRC2_CBC, EVP_rc2_64_cbc(), EVP_md5(),
EVP_PBE_alg_add(NID_pbeWithMD5AndRC2_CBC, EVP_rc2_64_cbc(), EVP_md5(),
							 PKCS5_PBE_keyivgen);
							 PKCS5_PBE_keyivgen);
#  endif
#  ifndef NO_MD2
EVP_PBE_alg_add(NID_pbeWithMD2AndRC2_CBC, EVP_rc2_64_cbc(), EVP_md2(),
EVP_PBE_alg_add(NID_pbeWithMD2AndRC2_CBC, EVP_rc2_64_cbc(), EVP_md2(),
							 PKCS5_PBE_keyivgen);
							 PKCS5_PBE_keyivgen);
#  endif
#  ifndef NO_SHA
EVP_PBE_alg_add(NID_pbeWithSHA1AndRC2_CBC, EVP_rc2_64_cbc(), EVP_sha1(),
EVP_PBE_alg_add(NID_pbeWithSHA1AndRC2_CBC, EVP_rc2_64_cbc(), EVP_sha1(),
							 PKCS5_PBE_keyivgen);
							 PKCS5_PBE_keyivgen);
#  endif
#  endif
#endif
#ifndef NO_HMAC
EVP_PBE_alg_add(NID_pbes2, NULL, NULL, PKCS5_v2_PBE_keyivgen);
EVP_PBE_alg_add(NID_pbes2, NULL, NULL, PKCS5_v2_PBE_keyivgen);
#endif
}
}


int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen,
int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen,
+1 −1
Original line number Original line Diff line number Diff line
@@ -605,13 +605,13 @@ int i2d_RSAPublicKey_bio(BIO *bp,RSA *rsa);
#ifndef NO_DSA
#ifndef NO_DSA
DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
#endif
X509_SIG *d2i_PKCS8_bio(BIO *bp,X509_SIG **p8);
X509_SIG *d2i_PKCS8_bio(BIO *bp,X509_SIG **p8);
int i2d_PKCS8_bio(BIO *bp,X509_SIG *p8);
int i2d_PKCS8_bio(BIO *bp,X509_SIG *p8);
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
						PKCS8_PRIV_KEY_INFO **p8inf);
						PKCS8_PRIV_KEY_INFO **p8inf);
int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,PKCS8_PRIV_KEY_INFO *p8inf);
int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,PKCS8_PRIV_KEY_INFO *p8inf);
#endif
#endif
#endif


X509 *X509_dup(X509 *x509);
X509 *X509_dup(X509 *x509);
X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);