mirror of
https://github.com/chris2511/xca.git
synced 2026-09-14 11:06:19 +05:00
Drop OpenSSL backward compatibility hacks < 1.1.0
OpenSSL < 1.1.1 is out of support anyway
This commit is contained in:
parent
d5fa97c3bb
commit
1500e636c8
4
INSTALL
4
INSTALL
@ -9,8 +9,8 @@ Requirements:
|
||||
|
||||
for compilation, you need the following Libraries:
|
||||
|
||||
QT >= 4.8.0 from http://www.troll.no
|
||||
OpenSSL >= 1.0.2 from http://www.openssl.org
|
||||
QT >= 5.0.0 from http://www.troll.no
|
||||
OpenSSL >= 1.1.0 from http://www.openssl.org
|
||||
|
||||
GNU C++ compiler >= 3.1.0
|
||||
GNU make
|
||||
|
||||
@ -120,7 +120,7 @@ if test -n "${_OPENSSLDIR}" && test -d "${_OPENSSLDIR}"; then
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES([OpenSSL],
|
||||
[libcrypto >= 1.0.2], [ ],
|
||||
[libcrypto >= 1.1.0], [ ],
|
||||
[
|
||||
OpenSSL_LIBS=" -lcrypto ";
|
||||
AC_MSG_WARN([OpenSSL pkg-config failed, using fallback defaults (${OpenSSL_LIBS})]);
|
||||
|
||||
@ -252,14 +252,12 @@ void db_key::store(QModelIndex index)
|
||||
if (!index.isValid() || !key)
|
||||
return;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
int keytype = key->getKeyType();
|
||||
if (keytype == EVP_PKEY_RSA || keytype == EVP_PKEY_DSA)
|
||||
pvk = true;
|
||||
#ifdef EVP_PKEY_ED25519
|
||||
if (keytype == EVP_PKEY_ED25519)
|
||||
ed25519 = true;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
types <<
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
#include "func.h"
|
||||
#include "xfile.h"
|
||||
#include "entropy.h"
|
||||
#include "openssl_compat.h"
|
||||
|
||||
/* Entropy sources for XCA
|
||||
*
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/* This header equalizes a lot of OpenSSL 1.1.0 vs. 1.0.0
|
||||
API clashes by defining some macros if OpenSSL < 1.1.0
|
||||
/* This header equalizes a lot of OpenSSL 1.1.0 vs. 1.1.1
|
||||
API clashes by defining some macros if OpenSSL < 1.1.1
|
||||
is used. This way the code is written with the new API
|
||||
and have much less #ifdefs
|
||||
*/
|
||||
@ -16,110 +16,6 @@
|
||||
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/dsa.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#define RAND_bytes(buf, size) RAND_pseudo_bytes((buf), (size))
|
||||
|
||||
#define X509_get0_extensions(cert) ((cert)->cert_info->extensions)
|
||||
#define X509_get_signature_nid(cert) OBJ_obj2nid((cert)->sig_alg->algorithm)
|
||||
#define X509_REQ_get_signature_nid(req) OBJ_obj2nid((req)->sig_alg->algorithm)
|
||||
|
||||
#define EVP_PKEY_set_type(key, type) ((key)->type = (type))
|
||||
#define EVP_PKEY_id(pkey) ((pkey)->type)
|
||||
|
||||
#define X509_REVOKED_get0_serialNumber(r) (r->serialNumber)
|
||||
#define X509_REVOKED_get0_revocationDate(r) (r->revocationDate)
|
||||
|
||||
#define DSA_SIG_set0(dsa_sig, r, s) ((dsa_sig)->r = r, (dsa_sig)->s = s)
|
||||
#define RSA_set0_key(r,_n,_e,_d) ((r)->n=(_n),(r)->e=(_e),(r)->d=(_d))
|
||||
#define DSA_set0_pqg(d,_p,_q,_g) ((d)->p=(_p),(d)->q=(_q),(d)->g=(_g))
|
||||
#define DSA_set0_key(d,pub,priv) ((d)->pub_key=(pub),(d)->priv_key=(priv))
|
||||
#define EVP_PKEY_get0_DSA(pub) ((pub)->pkey.dsa)
|
||||
#define EVP_PKEY_get0_RSA(pub) ((pub)->pkey.rsa)
|
||||
#define EVP_PKEY_get0_EC_KEY(pub) ((pub)->pkey.ec)
|
||||
#define EVP_PKEY_get0(p) ((p)->pkey.ptr)
|
||||
|
||||
#define X509_CRL_get_signature_nid(crl) OBJ_obj2nid((crl)->sig_alg->algorithm)
|
||||
#define X509_CRL_get0_extensions(crl) ((crl)->crl->extensions)
|
||||
#define X509_CRL_get0_lastUpdate(crl) ((crl)->crl->lastUpdate)
|
||||
#define X509_CRL_get0_nextUpdate(crl) ((crl)->crl->nextUpdate)
|
||||
|
||||
static inline void
|
||||
RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
|
||||
{
|
||||
if (n) *n = r->n;
|
||||
if (e) *e = r->e;
|
||||
if (d) *d = r->d;
|
||||
}
|
||||
|
||||
static inline void
|
||||
DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
|
||||
{
|
||||
if (p) *p = d->p;
|
||||
if (q) *q = d->q;
|
||||
if (g) *g = d->g;
|
||||
}
|
||||
|
||||
static inline void
|
||||
DSA_get0_key(const DSA *d, const BIGNUM **pub, const BIGNUM **priv)
|
||||
{
|
||||
if (priv) *priv = d->priv_key;
|
||||
if (pub) *pub = d->pub_key;
|
||||
}
|
||||
|
||||
static inline void
|
||||
RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q)
|
||||
{
|
||||
if (p) *p = r->p;
|
||||
if (q) *q = r->q;
|
||||
}
|
||||
static inline void
|
||||
RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1,
|
||||
const BIGNUM **iqmp)
|
||||
{
|
||||
if (dmp1) *dmp1=r->dmp1;
|
||||
if (dmq1) *dmq1=r->dmq1;
|
||||
if (iqmp) *iqmp=r->iqmp;
|
||||
}
|
||||
|
||||
static inline void *OPENSSL_zalloc(size_t num)
|
||||
{
|
||||
void *ret = OPENSSL_malloc(num);
|
||||
|
||||
if (ret)
|
||||
memset(ret, 0, num);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
|
||||
{
|
||||
return (EVP_MD_CTX*)OPENSSL_zalloc(sizeof(EVP_MD_CTX));
|
||||
}
|
||||
|
||||
static inline void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
|
||||
{
|
||||
EVP_MD_CTX_cleanup(ctx);
|
||||
OPENSSL_free(ctx);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static inline EVP_CIPHER_CTX *EVP_CIPHER_CTX_new()
|
||||
{
|
||||
return (EVP_CIPHER_CTX*)OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
|
||||
}
|
||||
|
||||
static inline void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
|
||||
{
|
||||
EVP_CIPHER_CTX_cleanup(ctx);
|
||||
OPENSSL_free(ctx);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10101000L || defined LIBRESSL_VERSION_NUMBER
|
||||
|
||||
static inline int
|
||||
|
||||
@ -27,8 +27,6 @@
|
||||
#include "widgets/PwDialog.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
|
||||
#include "openssl_compat.h"
|
||||
|
||||
void waitcursor(int start, int line)
|
||||
{
|
||||
qDebug() << "Waitcursor" << (start ? "start" : "end") << line;
|
||||
@ -655,8 +653,7 @@ int pkcs11::encrypt(int flen, const unsigned char *from,
|
||||
return size;
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10000000L || \
|
||||
OPENSSL_VERSION_NUMBER >= 0x10100000L && ! defined LIBRESSL_VERSION_NUMBER
|
||||
#ifndef LIBRESSL_VERSION_NUMBER
|
||||
static int rsa_privdata_free(RSA *rsa)
|
||||
{
|
||||
pkcs11 *priv = (pkcs11*)RSA_get_app_data(rsa);
|
||||
@ -720,8 +717,7 @@ out:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
// OpenSSL < 1.0.0 have no EC_KEY_METHOD.
|
||||
#ifndef OPENSSL_NO_EC
|
||||
|
||||
static void ec_privdata_free(EC_KEY *ec)
|
||||
{
|
||||
@ -819,13 +815,9 @@ static EC_KEY_METHOD *setup_ec_key_meth()
|
||||
|
||||
EVP_PKEY *pkcs11::getPrivateKey(EVP_PKEY *pub, CK_OBJECT_HANDLE obj)
|
||||
{
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
static RSA_METHOD rsa_meth_buf;
|
||||
static DSA_METHOD dsa_meth_buf;
|
||||
#endif
|
||||
static RSA_METHOD *rsa_meth = NULL;
|
||||
static DSA_METHOD *dsa_meth = NULL;
|
||||
#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
#ifndef OPENSSL_NO_EC
|
||||
static EC_KEY_METHOD *ec_key_meth = NULL;
|
||||
EC_KEY *ec;
|
||||
#endif
|
||||
@ -844,18 +836,10 @@ EVP_PKEY *pkcs11::getPrivateKey(EVP_PKEY *pub, CK_OBJECT_HANDLE obj)
|
||||
rsa = RSAPublicKey_dup(rsa);
|
||||
openssl_error();
|
||||
if (!rsa_meth) {
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x1010000L
|
||||
rsa_meth = RSA_meth_dup(RSA_get_default_method());
|
||||
RSA_meth_set_priv_enc(rsa_meth, rsa_encrypt);
|
||||
RSA_meth_set_priv_dec(rsa_meth, rsa_decrypt);
|
||||
RSA_meth_set_finish(rsa_meth, rsa_privdata_free);
|
||||
#else
|
||||
rsa_meth = &rsa_meth_buf;
|
||||
*rsa_meth = *RSA_get_default_method();
|
||||
rsa_meth->rsa_priv_enc = rsa_encrypt;
|
||||
rsa_meth->rsa_priv_dec = rsa_decrypt;
|
||||
rsa_meth->finish = rsa_privdata_free;
|
||||
#endif
|
||||
}
|
||||
p11obj = obj;
|
||||
RSA_set_method(rsa, rsa_meth);
|
||||
@ -869,16 +853,9 @@ EVP_PKEY *pkcs11::getPrivateKey(EVP_PKEY *pub, CK_OBJECT_HANDLE obj)
|
||||
dsa = DSAparams_dup(dsa);
|
||||
openssl_error();
|
||||
if (!dsa_meth) {
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
dsa_meth = DSA_meth_dup(DSA_get_default_method());
|
||||
DSA_meth_set_sign(dsa_meth, dsa_sign);
|
||||
DSA_meth_set_finish(dsa_meth, dsa_privdata_free);
|
||||
#else
|
||||
dsa_meth = &dsa_meth_buf;
|
||||
*dsa_meth = *DSA_get_default_method();
|
||||
dsa_meth->dsa_do_sign = dsa_sign;
|
||||
dsa_meth->finish = dsa_privdata_free;
|
||||
#endif
|
||||
}
|
||||
p11obj = obj;
|
||||
DSA_set_method(dsa, dsa_meth);
|
||||
@ -887,7 +864,7 @@ EVP_PKEY *pkcs11::getPrivateKey(EVP_PKEY *pub, CK_OBJECT_HANDLE obj)
|
||||
openssl_error();
|
||||
EVP_PKEY_assign_DSA(evp, dsa);
|
||||
break;
|
||||
#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
#ifndef OPENSSL_NO_EC
|
||||
case EVP_PKEY_EC:
|
||||
ec = EVP_PKEY_get0_EC_KEY(pub);
|
||||
ec = EC_KEY_dup(ec);
|
||||
|
||||
@ -12,8 +12,6 @@
|
||||
#include "database_model.h"
|
||||
#include <QDir>
|
||||
|
||||
#include "openssl_compat.h"
|
||||
|
||||
pki_crl::pki_crl(const QString name )
|
||||
:pki_x509name(name)
|
||||
{
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#include "widgets/PwDialog.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
#include "widgets/XcaProgress.h"
|
||||
#include "openssl_compat.h"
|
||||
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/evp.h>
|
||||
@ -22,8 +23,6 @@
|
||||
#include <openssl/pkcs12.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#include "openssl_compat.h"
|
||||
|
||||
Passwd pki_evp::passwd;
|
||||
Passwd pki_evp::oldpasswd;
|
||||
|
||||
@ -90,11 +89,7 @@ void pki_evp::generate(const keyjob &task)
|
||||
Entropy::seed_rng();
|
||||
XcaProgress progress;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
BN_GENCB _bar, *bar = &_bar;
|
||||
#else
|
||||
BN_GENCB *bar = BN_GENCB_new();
|
||||
#endif
|
||||
BN_GENCB_set_old(bar, XcaProgress::inc, &progress);
|
||||
|
||||
switch (task.ktype.type) {
|
||||
@ -154,9 +149,7 @@ void pki_evp::generate(const keyjob &task)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
BN_GENCB_free(bar);
|
||||
#endif
|
||||
isPub = false;
|
||||
pkiSource = generated;
|
||||
pki_openssl_error();
|
||||
@ -181,7 +174,6 @@ pki_evp::pki_evp(const QString &n, int type)
|
||||
pki_openssl_error();
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
static bool EVP_PKEY_isPrivKey(EVP_PKEY *key)
|
||||
{
|
||||
const BIGNUM *b;
|
||||
@ -212,28 +204,6 @@ static bool EVP_PKEY_isPrivKey(EVP_PKEY *key)
|
||||
return false;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static bool EVP_PKEY_isPrivKey(EVP_PKEY *key)
|
||||
{
|
||||
int keytype;
|
||||
|
||||
keytype = EVP_PKEY_id(key);
|
||||
|
||||
switch (EVP_PKEY_type(keytype)) {
|
||||
case EVP_PKEY_RSA:
|
||||
return key->pkey.rsa->d ? true: false;
|
||||
case EVP_PKEY_DSA:
|
||||
return key->pkey.dsa->priv_key ? true: false;
|
||||
#ifndef OPENSSL_NO_EC
|
||||
case EVP_PKEY_EC:
|
||||
return EC_KEY_get0_private_key(key->pkey.ec) ? true: false;
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
pki_evp::pki_evp(EVP_PKEY *pkey)
|
||||
:pki_key()
|
||||
{
|
||||
@ -453,7 +423,6 @@ void pki_evp::fload(const QString &fname)
|
||||
PKCS8_PRIV_KEY_INFO_free(p8inf);
|
||||
}
|
||||
}
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
if (!pkey) {
|
||||
pki_ign_openssl_error();
|
||||
file.retry_read();
|
||||
@ -464,7 +433,6 @@ void pki_evp::fload(const QString &fname)
|
||||
file.retry_read();
|
||||
pkey = load_ssh_ed25519_privatekey(file.read(10000), p);
|
||||
}
|
||||
#endif
|
||||
if (!pkey) {
|
||||
pki_ign_openssl_error();
|
||||
file.retry_read();
|
||||
@ -480,13 +448,11 @@ void pki_evp::fload(const QString &fname)
|
||||
file.retry_read();
|
||||
pkey = load_ssh2_key(file);
|
||||
}
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
if (!pkey) {
|
||||
pki_ign_openssl_error();
|
||||
file.retry_read();
|
||||
pkey = b2i_PublicKey_bio(file.bio());
|
||||
}
|
||||
#endif
|
||||
if (pki_ign_openssl_error() || !pkey) {
|
||||
if (pkey)
|
||||
EVP_PKEY_free(pkey);
|
||||
@ -804,7 +770,6 @@ void pki_evp::writePKCS8(XFile &file, const EVP_CIPHER *enc,
|
||||
|
||||
void pki_evp::writePVKprivate(XFile &file, pem_password_cb *cb) const
|
||||
{
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
pass_info p(XCA_TITLE, tr("Please enter the password protecting the Microsoft PVK key '%1'").arg(getIntName()));
|
||||
|
||||
int enc = cb ? 2 /* pvk-strong */ : 0 /* pvk-none */;
|
||||
@ -823,12 +788,8 @@ void pki_evp::writePVKprivate(XFile &file, pem_password_cb *cb) const
|
||||
}
|
||||
ign_openssl_error();
|
||||
EVP_PKEY_free(pkey);
|
||||
#else
|
||||
(void)file;
|
||||
(void)cb;
|
||||
throw errorEx("Internal Error");
|
||||
#endif
|
||||
}
|
||||
|
||||
static int mycb(char *buf, int size, int, void *)
|
||||
{
|
||||
strncpy(buf, pki_evp::passwd, size);
|
||||
@ -843,7 +804,7 @@ void pki_evp::writeDefault(const QString &dirname) const
|
||||
mycb, true);
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER
|
||||
#ifndef LIBRESSL_VERSION_NUMBER
|
||||
int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x,
|
||||
const EVP_CIPHER *enc,
|
||||
unsigned char *kstr, int klen,
|
||||
@ -886,7 +847,6 @@ void pki_evp::writeKey(XFile &file, const EVP_CIPHER *enc,
|
||||
bool pki_evp::verify_priv(EVP_PKEY *pkey) const
|
||||
{
|
||||
bool verify = true;
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
unsigned char data[32], sig[1024];
|
||||
size_t datalen = sizeof data, siglen = sizeof sig;
|
||||
EVP_MD_CTX *ctx = NULL;
|
||||
@ -928,7 +888,7 @@ bool pki_evp::verify_priv(EVP_PKEY *pkey) const
|
||||
|
||||
if (ctx)
|
||||
EVP_MD_CTX_free(ctx);
|
||||
#endif
|
||||
|
||||
if (EVP_PKEY_id(pkey) == EVP_PKEY_RSA && EVP_PKEY_isPrivKey(pkey)) {
|
||||
RSA *rsa = EVP_PKEY_get0_RSA(pkey);
|
||||
if (RSA_check_key(rsa) != 1)
|
||||
|
||||
@ -17,8 +17,6 @@
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/pem.h>
|
||||
|
||||
#include "openssl_compat.h"
|
||||
|
||||
builtin_curves builtinCurves;
|
||||
|
||||
pki_key::pki_key(const QString &name)
|
||||
@ -421,16 +419,11 @@ QList<int> pki_key::possibleHashNids()
|
||||
NID_sha384 << NID_sha512 << NID_ripemd160;
|
||||
break;
|
||||
case EVP_PKEY_DSA:
|
||||
nids << NID_sha1;
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
nids << NID_sha256;
|
||||
#endif
|
||||
nids << NID_sha1 << NID_sha256;
|
||||
break;
|
||||
case EVP_PKEY_EC:
|
||||
nids << NID_sha1;
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
nids << NID_sha224 << NID_sha256 << NID_sha384 << NID_sha512;
|
||||
#endif
|
||||
nids << NID_sha1 << NID_sha224 << NID_sha256 <<
|
||||
NID_sha384 << NID_sha512;
|
||||
break;
|
||||
}
|
||||
return nids;
|
||||
@ -909,12 +902,7 @@ QByteArray pki_key::X509_PUBKEY_public_key() const
|
||||
int len;
|
||||
|
||||
X509_PUBKEY_set(&pk, key);
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10000000L
|
||||
p = pk->public_key->data;
|
||||
len = pk->public_key->length;
|
||||
#else
|
||||
X509_PUBKEY_get0_param(NULL, &p, &len, NULL, pk);
|
||||
#endif
|
||||
|
||||
QByteArray data((const char*)p, len);
|
||||
X509_PUBKEY_free(pk);
|
||||
@ -949,11 +937,7 @@ void pki_key::print(BioByteArray &bba, enum print_opt opt) const
|
||||
pki_base::print(bba, opt);
|
||||
switch (opt) {
|
||||
case print_openssl_txt:
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10000000L
|
||||
bba += "Not supported\n";
|
||||
#else
|
||||
EVP_PKEY_print_public(bba, key, 0, NULL);
|
||||
#endif
|
||||
break;
|
||||
case print_pem:
|
||||
PEM_write_bio_PUBKEY(bba, key);
|
||||
|
||||
@ -15,8 +15,6 @@
|
||||
#include "pki_base.h"
|
||||
#include "builtin_curves.h"
|
||||
|
||||
#include "openssl_compat.h"
|
||||
|
||||
#define PEM_STRING_OPENSSH_KEY "OPENSSH PRIVATE KEY"
|
||||
#define DEFAULT_KEY_LENGTH 2048
|
||||
#define ED25519_KEYLEN 32
|
||||
|
||||
@ -21,8 +21,6 @@
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "openssl_compat.h"
|
||||
|
||||
pki_pkcs12::pki_pkcs12(const QString &d, pki_x509 *acert, pki_key *akey)
|
||||
:pki_multi(d), cert(acert), key(akey)
|
||||
{
|
||||
|
||||
@ -22,8 +22,6 @@
|
||||
#include <QProgressBar>
|
||||
#include <ltdl.h>
|
||||
|
||||
#include "openssl_compat.h"
|
||||
|
||||
void pki_scard::init(void)
|
||||
{
|
||||
ownPass = ptPin;
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
#include "base.h"
|
||||
#include "exception.h"
|
||||
#include "pass_info.h"
|
||||
#include "openssl_compat.h"
|
||||
#include "widgets/XcaWarning.h"
|
||||
|
||||
pki_x509::pki_x509(X509 *c)
|
||||
:pki_x509super()
|
||||
|
||||
@ -17,8 +17,6 @@
|
||||
#include "exception.h"
|
||||
#include <openssl/bio.h>
|
||||
|
||||
#include "openssl_compat.h"
|
||||
|
||||
pki_x509req::pki_x509req(const QString &name)
|
||||
: pki_x509super(name)
|
||||
{
|
||||
|
||||
@ -15,9 +15,6 @@
|
||||
#include <QVariant>
|
||||
#include <QSqlQuery>
|
||||
|
||||
#include "openssl_compat.h"
|
||||
|
||||
#ifndef CRL_REASON_UNSPECIFIED
|
||||
#define CRL_REASON_UNSPECIFIED 0
|
||||
#define CRL_REASON_KEY_COMPROMISE 1
|
||||
#define CRL_REASON_CA_COMPROMISE 2
|
||||
@ -28,7 +25,6 @@
|
||||
#define CRL_REASON_REMOVE_FROM_CRL 8
|
||||
#define CRL_REASON_PRIVILEGE_WITHDRAWN 9
|
||||
#define CRL_REASON_AA_COMPROMISE 10
|
||||
#endif
|
||||
|
||||
static ENUMERATED_NAMES crl_reasons[] = {
|
||||
{CRL_REASON_UNSPECIFIED, "Unspecified", "unspecified"},
|
||||
|
||||
@ -587,13 +587,6 @@ bool x509v3ext::parse_Crldp(QString *single, QString *adv) const
|
||||
*adv = QString("%1=%2\n").arg(sn).
|
||||
arg(parse_critical() + crldps.join(", ")) +
|
||||
*adv + othersect;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10000000L
|
||||
*adv = QString( "\n"
|
||||
"# This syntax only works for openssl >= 1.0.0\n"
|
||||
"# But this is %1\n"
|
||||
"# ").arg(OPENSSL_VERSION_TEXT) + *adv;
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
|
||||
|
||||
@ -37,14 +37,6 @@ int main(){
|
||||
strcat(buf, C"lt_dlinit() returned != 0\n");
|
||||
#ifdef OPENSSL_NO_EC
|
||||
strcat(buf, C"This OpenSSL installation has no EC cryptography support\n");
|
||||
#else
|
||||
#ifdef NID_brainpoolP160r1
|
||||
printf(C"ECC With RFC 5639 Brainpool curves enabled\n"
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10002001L
|
||||
C" (Backported to " OPENSSL_VERSION_TEXT ")\n"
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
#endif
|
||||
if (*buf)
|
||||
printf(WARN "%s" WARN, buf);
|
||||
|
||||
@ -1,138 +0,0 @@
|
||||
--- openssl-1.0.0.orig/ms/mingw32-cross.sh 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ openssl-1.0.0/ms/mingw32-cross.sh 2010-04-10 10:22:33.000000000 +0200
|
||||
@@ -0,0 +1,37 @@
|
||||
+#!/bin/sh
|
||||
+# Mingw32 on Linux + GNU as
|
||||
+# ---------------------------
|
||||
+
|
||||
+set -e
|
||||
+
|
||||
+CROSS=i586-mingw32msvc-
|
||||
+
|
||||
+sh ./Configure mingw $@
|
||||
+
|
||||
+echo Generating makefile
|
||||
+perl util/mkfiles.pl >MINFO
|
||||
+perl util/mk1mf.pl gaswin $@ Mingw32-cross >ms/mingw32-cross.mak
|
||||
+
|
||||
+echo Generating DLL definition files
|
||||
+perl util/mkdef.pl 32 libeay >ms/libeay32.def
|
||||
+perl util/mkdef.pl 32 ssleay >ms/ssleay32.def
|
||||
+
|
||||
+echo Building the libraries
|
||||
+make -f ms/mingw32-cross.mak CROSS=${CROSS}
|
||||
+
|
||||
+echo Generating the DLLs and input libraries
|
||||
+${CROSS}dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lwsock32 -lgdi32
|
||||
+
|
||||
+${CROSS}dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a
|
||||
+
|
||||
+echo "Done compiling OpenSSL"
|
||||
+
|
||||
+if test -n "${INSTALL_DIR}"; then
|
||||
+ echo "Installing OpenSSL to '${INSTALL_DIR}'"
|
||||
+ mkdir -p ${INSTALL_DIR}/bin ${INSTALL_DIR}/lib ${INSTALL_DIR}/include
|
||||
+ cp -r outinc/openssl ${INSTALL_DIR}/include
|
||||
+ cp *.dll ${INSTALL_DIR}/bin
|
||||
+ cp out/*.a ${INSTALL_DIR}/lib
|
||||
+fi
|
||||
+
|
||||
+
|
||||
--- openssl-1.0.0.orig/util/mk1mf.pl 2009-09-20 14:47:04.000000000 +0200
|
||||
+++ openssl-1.0.0/util/mk1mf.pl 2010-04-10 09:28:56.000000000 +0200
|
||||
@@ -67,6 +67,7 @@
|
||||
"VC-CE", "Microsoft eMbedded Visual C++ 3.0 - Windows CE ONLY",
|
||||
"VC-NT", "Microsoft Visual C++ [4-6] - Windows NT ONLY",
|
||||
"Mingw32", "GNU C++ - Windows NT or 9x",
|
||||
+ "Mingw32-cross", "GNU C++ Linux cross compiling",
|
||||
"Mingw32-files", "Create files with DOS copy ...",
|
||||
"BC-NT", "Borland C++ 4.5 - Windows NT",
|
||||
"linux-elf","Linux elf",
|
||||
@@ -181,6 +182,10 @@
|
||||
{
|
||||
require 'Mingw32.pl';
|
||||
}
|
||||
+elsif ($platform eq "Mingw32-cross")
|
||||
+ {
|
||||
+ require 'Mingw32-cross.pl';
|
||||
+ }
|
||||
elsif ($platform eq "Mingw32-files")
|
||||
{
|
||||
require 'Mingw32f.pl';
|
||||
--- openssl-1.0.0.orig/util/pl/Mingw32-cross.pl 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ openssl-1.0.0/util/pl/Mingw32-cross.pl 2010-04-10 10:24:35.000000000 +0200
|
||||
@@ -0,0 +1,74 @@
|
||||
+#!/usr/local/bin/perl
|
||||
+#
|
||||
+# Mingw32.pl -- Mingw
|
||||
+#
|
||||
+
|
||||
+$o='/';
|
||||
+$cp='cp';
|
||||
+$rm='rm -f';
|
||||
+$mkdir='mkdir -p';
|
||||
+
|
||||
+# C compiler stuff
|
||||
+
|
||||
+$asmtype="gaswin";
|
||||
+
|
||||
+$cc='$(CROSS)gcc';
|
||||
+if ($debug)
|
||||
+ { $cflags="-DL_ENDIAN -DDSO_WIN32 -g2 -ggdb"; }
|
||||
+else
|
||||
+ { $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -march=i686 -Wall"; }
|
||||
+
|
||||
+if ($gaswin and !$no_asm)
|
||||
+ { $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS"; }
|
||||
+
|
||||
+
|
||||
+$obj='.o';
|
||||
+$ofile='-o ';
|
||||
+
|
||||
+# EXE linking stuff
|
||||
+$link='${CC}';
|
||||
+$lflags='${CFLAGS}';
|
||||
+$efile='-o ';
|
||||
+$exep='.exe';
|
||||
+$ex_libs="-lwsock32 -lgdi32";
|
||||
+
|
||||
+# static library stuff
|
||||
+$mklib='$(CROSS)ar r';
|
||||
+$mlflags='';
|
||||
+$ranlib='$(CROSS)ranlib';
|
||||
+$plib='lib';
|
||||
+$libp=".a";
|
||||
+$shlibp=".a";
|
||||
+$lfile='';
|
||||
+
|
||||
+$asm='$(CROSS)as';
|
||||
+$afile='-o ';
|
||||
+
|
||||
+
|
||||
+sub do_lib_rule
|
||||
+ {
|
||||
+ local($obj,$target,$name,$shlib)=@_;
|
||||
+ local($ret,$_,$Name);
|
||||
+
|
||||
+ $target =~ s/\//$o/g if $o ne '/';
|
||||
+ $target="$target";
|
||||
+ ($Name=$name) =~ tr/a-z/A-Z/;
|
||||
+
|
||||
+ $ret.="$target: \$(${Name}OBJ)\n";
|
||||
+ $ret.="\trm -f $target\n";
|
||||
+ $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
|
||||
+ $ret.="\t\$(RANLIB) $target\n\n";
|
||||
+ }
|
||||
+
|
||||
+sub do_link_rule
|
||||
+ {
|
||||
+ local($target,$files,$dep_libs,$libs)=@_;
|
||||
+ local($ret,$_);
|
||||
+
|
||||
+ $file =~ s/\//$o/g if $o ne '/';
|
||||
+ $n=&bname($target);
|
||||
+ $ret.="$target: $files $dep_libs\n";
|
||||
+ $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n";
|
||||
+ return($ret);
|
||||
+ }
|
||||
+1;
|
||||
@ -1,773 +0,0 @@
|
||||
From 3ee1ac6a0961eb3b97739fb86717e246a45e2743 Mon Sep 17 00:00:00 2001
|
||||
From: "Dr. Stephen Henson" <steve@openssl.org>
|
||||
Date: Sat, 22 Nov 2014 09:19:47 +0100
|
||||
Subject: [PATCH] PR: 2239
|
||||
|
||||
Submitted by: Dominik Oepen <oepen@informatik.hu-berlin.de>
|
||||
|
||||
Add Brainpool curves from RFC5639.
|
||||
|
||||
Original patch by Annie Yousar <a.yousar@informatik.hu-berlin.de>
|
||||
|
||||
Backported to OpenSSL 1.0.1j by Christian Hohnstaedt <christian@hohnstaedt.de>
|
||||
---
|
||||
crypto/ec/ec_curve.c | 443 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
crypto/objects/obj_dat.h | 99 +++++++++-
|
||||
crypto/objects/obj_mac.h | 61 ++++++
|
||||
crypto/objects/obj_mac.num | 15 ++
|
||||
crypto/objects/objects.txt | 22 +++
|
||||
5 files changed, 635 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c
|
||||
index c72fb26..a36efb2 100644
|
||||
--- a/crypto/ec/ec_curve.c
|
||||
+++ b/crypto/ec/ec_curve.c
|
||||
@@ -1822,6 +1822,434 @@ static const struct { EC_CURVE_DATA h; unsigned char data[0+24*6]; }
|
||||
|
||||
#endif
|
||||
|
||||
+/* These curves were added by Annie Yousar <a.yousar@informatik.hu-berlin.de>
|
||||
+ * For the definition of RFC 5639 curves see
|
||||
+ * http://www.ietf.org/rfc/rfc5639.txt
|
||||
+ * These curves are generated verifiable at random, nevertheless the seed is
|
||||
+ * omitted as parameter because the generation mechanism is different from
|
||||
+ * those defined in ANSI X9.62.
|
||||
+ */
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+20*6]; }
|
||||
+ _EC_brainpoolP160r1 = {
|
||||
+ { NID_X9_62_prime_field, 0,20,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xE9,0x5E,0x4A,0x5F,0x73,0x70,0x59,0xDC,0x60,0xDF, /* p */
|
||||
+ 0xC7,0xAD,0x95,0xB3,0xD8,0x13,0x95,0x15,0x62,0x0F,
|
||||
+ 0x34,0x0E,0x7B,0xE2,0xA2,0x80,0xEB,0x74,0xE2,0xBE, /* a */
|
||||
+ 0x61,0xBA,0xDA,0x74,0x5D,0x97,0xE8,0xF7,0xC3,0x00,
|
||||
+ 0x1E,0x58,0x9A,0x85,0x95,0x42,0x34,0x12,0x13,0x4F, /* b */
|
||||
+ 0xAA,0x2D,0xBD,0xEC,0x95,0xC8,0xD8,0x67,0x5E,0x58,
|
||||
+ 0xBE,0xD5,0xAF,0x16,0xEA,0x3F,0x6A,0x4F,0x62,0x93, /* x */
|
||||
+ 0x8C,0x46,0x31,0xEB,0x5A,0xF7,0xBD,0xBC,0xDB,0xC3,
|
||||
+ 0x16,0x67,0xCB,0x47,0x7A,0x1A,0x8E,0xC3,0x38,0xF9, /* y */
|
||||
+ 0x47,0x41,0x66,0x9C,0x97,0x63,0x16,0xDA,0x63,0x21,
|
||||
+ 0xE9,0x5E,0x4A,0x5F,0x73,0x70,0x59,0xDC,0x60,0xDF, /* order */
|
||||
+ 0x59,0x91,0xD4,0x50,0x29,0x40,0x9E,0x60,0xFC,0x09 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+20*6]; }
|
||||
+ _EC_brainpoolP160t1 = {
|
||||
+ { NID_X9_62_prime_field, 0,20,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xE9,0x5E,0x4A,0x5F,0x73,0x70,0x59,0xDC,0x60,0xDF, /* p */
|
||||
+ 0xC7,0xAD,0x95,0xB3,0xD8,0x13,0x95,0x15,0x62,0x0F,
|
||||
+ 0xE9,0x5E,0x4A,0x5F,0x73,0x70,0x59,0xDC,0x60,0xDF, /* a */
|
||||
+ 0xC7,0xAD,0x95,0xB3,0xD8,0x13,0x95,0x15,0x62,0x0C,
|
||||
+ 0x7A,0x55,0x6B,0x6D,0xAE,0x53,0x5B,0x7B,0x51,0xED, /* b */
|
||||
+ 0x2C,0x4D,0x7D,0xAA,0x7A,0x0B,0x5C,0x55,0xF3,0x80,
|
||||
+ 0xB1,0x99,0xB1,0x3B,0x9B,0x34,0xEF,0xC1,0x39,0x7E, /* x */
|
||||
+ 0x64,0xBA,0xEB,0x05,0xAC,0xC2,0x65,0xFF,0x23,0x78,
|
||||
+ 0xAD,0xD6,0x71,0x8B,0x7C,0x7C,0x19,0x61,0xF0,0x99, /* y */
|
||||
+ 0x1B,0x84,0x24,0x43,0x77,0x21,0x52,0xC9,0xE0,0xAD,
|
||||
+ 0xE9,0x5E,0x4A,0x5F,0x73,0x70,0x59,0xDC,0x60,0xDF, /* order */
|
||||
+ 0x59,0x91,0xD4,0x50,0x29,0x40,0x9E,0x60,0xFC,0x09 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+24*6]; }
|
||||
+ _EC_brainpoolP192r1 = {
|
||||
+ { NID_X9_62_prime_field, 0,24,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xC3,0x02,0xF4,0x1D,0x93,0x2A,0x36,0xCD,0xA7,0xA3, /* p */
|
||||
+ 0x46,0x30,0x93,0xD1,0x8D,0xB7,0x8F,0xCE,0x47,0x6D,
|
||||
+ 0xE1,0xA8,0x62,0x97,
|
||||
+ 0x6A,0x91,0x17,0x40,0x76,0xB1,0xE0,0xE1,0x9C,0x39, /* a */
|
||||
+ 0xC0,0x31,0xFE,0x86,0x85,0xC1,0xCA,0xE0,0x40,0xE5,
|
||||
+ 0xC6,0x9A,0x28,0xEF,
|
||||
+ 0x46,0x9A,0x28,0xEF,0x7C,0x28,0xCC,0xA3,0xDC,0x72, /* b */
|
||||
+ 0x1D,0x04,0x4F,0x44,0x96,0xBC,0xCA,0x7E,0xF4,0x14,
|
||||
+ 0x6F,0xBF,0x25,0xC9,
|
||||
+ 0xC0,0xA0,0x64,0x7E,0xAA,0xB6,0xA4,0x87,0x53,0xB0, /* x */
|
||||
+ 0x33,0xC5,0x6C,0xB0,0xF0,0x90,0x0A,0x2F,0x5C,0x48,
|
||||
+ 0x53,0x37,0x5F,0xD6,
|
||||
+ 0x14,0xB6,0x90,0x86,0x6A,0xBD,0x5B,0xB8,0x8B,0x5F, /* y */
|
||||
+ 0x48,0x28,0xC1,0x49,0x00,0x02,0xE6,0x77,0x3F,0xA2,
|
||||
+ 0xFA,0x29,0x9B,0x8F,
|
||||
+ 0xC3,0x02,0xF4,0x1D,0x93,0x2A,0x36,0xCD,0xA7,0xA3, /* order */
|
||||
+ 0x46,0x2F,0x9E,0x9E,0x91,0x6B,0x5B,0xE8,0xF1,0x02,
|
||||
+ 0x9A,0xC4,0xAC,0xC1 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+24*6]; }
|
||||
+ _EC_brainpoolP192t1 = {
|
||||
+ { NID_X9_62_prime_field, 0,24,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xC3,0x02,0xF4,0x1D,0x93,0x2A,0x36,0xCD,0xA7,0xA3, /* p */
|
||||
+ 0x46,0x30,0x93,0xD1,0x8D,0xB7,0x8F,0xCE,0x47,0x6D,
|
||||
+ 0xE1,0xA8,0x62,0x97,
|
||||
+ 0xC3,0x02,0xF4,0x1D,0x93,0x2A,0x36,0xCD,0xA7,0xA3, /* a */
|
||||
+ 0x46,0x30,0x93,0xD1,0x8D,0xB7,0x8F,0xCE,0x47,0x6D,
|
||||
+ 0xE1,0xA8,0x62,0x94,
|
||||
+ 0x13,0xD5,0x6F,0xFA,0xEC,0x78,0x68,0x1E,0x68,0xF9, /* b */
|
||||
+ 0xDE,0xB4,0x3B,0x35,0xBE,0xC2,0xFB,0x68,0x54,0x2E,
|
||||
+ 0x27,0x89,0x7B,0x79,
|
||||
+ 0x3A,0xE9,0xE5,0x8C,0x82,0xF6,0x3C,0x30,0x28,0x2E, /* x */
|
||||
+ 0x1F,0xE7,0xBB,0xF4,0x3F,0xA7,0x2C,0x44,0x6A,0xF6,
|
||||
+ 0xF4,0x61,0x81,0x29,
|
||||
+ 0x09,0x7E,0x2C,0x56,0x67,0xC2,0x22,0x3A,0x90,0x2A, /* y */
|
||||
+ 0xB5,0xCA,0x44,0x9D,0x00,0x84,0xB7,0xE5,0xB3,0xDE,
|
||||
+ 0x7C,0xCC,0x01,0xC9,
|
||||
+ 0xC3,0x02,0xF4,0x1D,0x93,0x2A,0x36,0xCD,0xA7,0xA3, /* order */
|
||||
+ 0x46,0x2F,0x9E,0x9E,0x91,0x6B,0x5B,0xE8,0xF1,0x02,
|
||||
+ 0x9A,0xC4,0xAC,0xC1 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+28*6]; }
|
||||
+ _EC_brainpoolP224r1 = {
|
||||
+ { NID_X9_62_prime_field, 0,28,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xD7,0xC1,0x34,0xAA,0x26,0x43,0x66,0x86,0x2A,0x18, /* p */
|
||||
+ 0x30,0x25,0x75,0xD1,0xD7,0x87,0xB0,0x9F,0x07,0x57,
|
||||
+ 0x97,0xDA,0x89,0xF5,0x7E,0xC8,0xC0,0xFF,
|
||||
+ 0x68,0xA5,0xE6,0x2C,0xA9,0xCE,0x6C,0x1C,0x29,0x98, /* a */
|
||||
+ 0x03,0xA6,0xC1,0x53,0x0B,0x51,0x4E,0x18,0x2A,0xD8,
|
||||
+ 0xB0,0x04,0x2A,0x59,0xCA,0xD2,0x9F,0x43,
|
||||
+ 0x25,0x80,0xF6,0x3C,0xCF,0xE4,0x41,0x38,0x87,0x07, /* b */
|
||||
+ 0x13,0xB1,0xA9,0x23,0x69,0xE3,0x3E,0x21,0x35,0xD2,
|
||||
+ 0x66,0xDB,0xB3,0x72,0x38,0x6C,0x40,0x0B,
|
||||
+ 0x0D,0x90,0x29,0xAD,0x2C,0x7E,0x5C,0xF4,0x34,0x08, /* x */
|
||||
+ 0x23,0xB2,0xA8,0x7D,0xC6,0x8C,0x9E,0x4C,0xE3,0x17,
|
||||
+ 0x4C,0x1E,0x6E,0xFD,0xEE,0x12,0xC0,0x7D,
|
||||
+ 0x58,0xAA,0x56,0xF7,0x72,0xC0,0x72,0x6F,0x24,0xC6, /* y */
|
||||
+ 0xB8,0x9E,0x4E,0xCD,0xAC,0x24,0x35,0x4B,0x9E,0x99,
|
||||
+ 0xCA,0xA3,0xF6,0xD3,0x76,0x14,0x02,0xCD,
|
||||
+ 0xD7,0xC1,0x34,0xAA,0x26,0x43,0x66,0x86,0x2A,0x18, /* order */
|
||||
+ 0x30,0x25,0x75,0xD0,0xFB,0x98,0xD1,0x16,0xBC,0x4B,
|
||||
+ 0x6D,0xDE,0xBC,0xA3,0xA5,0xA7,0x93,0x9F }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+28*6]; }
|
||||
+ _EC_brainpoolP224t1 = {
|
||||
+ { NID_X9_62_prime_field, 0,28,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xD7,0xC1,0x34,0xAA,0x26,0x43,0x66,0x86,0x2A,0x18, /* p */
|
||||
+ 0x30,0x25,0x75,0xD1,0xD7,0x87,0xB0,0x9F,0x07,0x57,
|
||||
+ 0x97,0xDA,0x89,0xF5,0x7E,0xC8,0xC0,0xFF,
|
||||
+ 0xD7,0xC1,0x34,0xAA,0x26,0x43,0x66,0x86,0x2A,0x18, /* a */
|
||||
+ 0x30,0x25,0x75,0xD1,0xD7,0x87,0xB0,0x9F,0x07,0x57,
|
||||
+ 0x97,0xDA,0x89,0xF5,0x7E,0xC8,0xC0,0xFC,
|
||||
+ 0x4B,0x33,0x7D,0x93,0x41,0x04,0xCD,0x7B,0xEF,0x27, /* b */
|
||||
+ 0x1B,0xF6,0x0C,0xED,0x1E,0xD2,0x0D,0xA1,0x4C,0x08,
|
||||
+ 0xB3,0xBB,0x64,0xF1,0x8A,0x60,0x88,0x8D,
|
||||
+ 0x6A,0xB1,0xE3,0x44,0xCE,0x25,0xFF,0x38,0x96,0x42, /* x */
|
||||
+ 0x4E,0x7F,0xFE,0x14,0x76,0x2E,0xCB,0x49,0xF8,0x92,
|
||||
+ 0x8A,0xC0,0xC7,0x60,0x29,0xB4,0xD5,0x80,
|
||||
+ 0x03,0x74,0xE9,0xF5,0x14,0x3E,0x56,0x8C,0xD2,0x3F, /* y */
|
||||
+ 0x3F,0x4D,0x7C,0x0D,0x4B,0x1E,0x41,0xC8,0xCC,0x0D,
|
||||
+ 0x1C,0x6A,0xBD,0x5F,0x1A,0x46,0xDB,0x4C,
|
||||
+ 0xD7,0xC1,0x34,0xAA,0x26,0x43,0x66,0x86,0x2A,0x18, /* order */
|
||||
+ 0x30,0x25,0x75,0xD0,0xFB,0x98,0xD1,0x16,0xBC,0x4B,
|
||||
+ 0x6D,0xDE,0xBC,0xA3,0xA5,0xA7,0x93,0x9F }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+32*6]; }
|
||||
+ _EC_brainpoolP256r1 = {
|
||||
+ { NID_X9_62_prime_field, 0,32,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xA9,0xFB,0x57,0xDB,0xA1,0xEE,0xA9,0xBC,0x3E,0x66, /* p */
|
||||
+ 0x0A,0x90,0x9D,0x83,0x8D,0x72,0x6E,0x3B,0xF6,0x23,
|
||||
+ 0xD5,0x26,0x20,0x28,0x20,0x13,0x48,0x1D,0x1F,0x6E,
|
||||
+ 0x53,0x77,
|
||||
+ 0x7D,0x5A,0x09,0x75,0xFC,0x2C,0x30,0x57,0xEE,0xF6, /* a */
|
||||
+ 0x75,0x30,0x41,0x7A,0xFF,0xE7,0xFB,0x80,0x55,0xC1,
|
||||
+ 0x26,0xDC,0x5C,0x6C,0xE9,0x4A,0x4B,0x44,0xF3,0x30,
|
||||
+ 0xB5,0xD9,
|
||||
+ 0x26,0xDC,0x5C,0x6C,0xE9,0x4A,0x4B,0x44,0xF3,0x30, /* b */
|
||||
+ 0xB5,0xD9,0xBB,0xD7,0x7C,0xBF,0x95,0x84,0x16,0x29,
|
||||
+ 0x5C,0xF7,0xE1,0xCE,0x6B,0xCC,0xDC,0x18,0xFF,0x8C,
|
||||
+ 0x07,0xB6,
|
||||
+ 0x8B,0xD2,0xAE,0xB9,0xCB,0x7E,0x57,0xCB,0x2C,0x4B, /* x */
|
||||
+ 0x48,0x2F,0xFC,0x81,0xB7,0xAF,0xB9,0xDE,0x27,0xE1,
|
||||
+ 0xE3,0xBD,0x23,0xC2,0x3A,0x44,0x53,0xBD,0x9A,0xCE,
|
||||
+ 0x32,0x62,
|
||||
+ 0x54,0x7E,0xF8,0x35,0xC3,0xDA,0xC4,0xFD,0x97,0xF8, /* y */
|
||||
+ 0x46,0x1A,0x14,0x61,0x1D,0xC9,0xC2,0x77,0x45,0x13,
|
||||
+ 0x2D,0xED,0x8E,0x54,0x5C,0x1D,0x54,0xC7,0x2F,0x04,
|
||||
+ 0x69,0x97,
|
||||
+ 0xA9,0xFB,0x57,0xDB,0xA1,0xEE,0xA9,0xBC,0x3E,0x66, /* order */
|
||||
+ 0x0A,0x90,0x9D,0x83,0x8D,0x71,0x8C,0x39,0x7A,0xA3,
|
||||
+ 0xB5,0x61,0xA6,0xF7,0x90,0x1E,0x0E,0x82,0x97,0x48,
|
||||
+ 0x56,0xA7 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+32*6]; }
|
||||
+ _EC_brainpoolP256t1 = {
|
||||
+ { NID_X9_62_prime_field, 0,32,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xA9,0xFB,0x57,0xDB,0xA1,0xEE,0xA9,0xBC,0x3E,0x66, /* p */
|
||||
+ 0x0A,0x90,0x9D,0x83,0x8D,0x72,0x6E,0x3B,0xF6,0x23,
|
||||
+ 0xD5,0x26,0x20,0x28,0x20,0x13,0x48,0x1D,0x1F,0x6E,
|
||||
+ 0x53,0x77,
|
||||
+ 0xA9,0xFB,0x57,0xDB,0xA1,0xEE,0xA9,0xBC,0x3E,0x66, /* a */
|
||||
+ 0x0A,0x90,0x9D,0x83,0x8D,0x72,0x6E,0x3B,0xF6,0x23,
|
||||
+ 0xD5,0x26,0x20,0x28,0x20,0x13,0x48,0x1D,0x1F,0x6E,
|
||||
+ 0x53,0x74,
|
||||
+ 0x66,0x2C,0x61,0xC4,0x30,0xD8,0x4E,0xA4,0xFE,0x66, /* b */
|
||||
+ 0xA7,0x73,0x3D,0x0B,0x76,0xB7,0xBF,0x93,0xEB,0xC4,
|
||||
+ 0xAF,0x2F,0x49,0x25,0x6A,0xE5,0x81,0x01,0xFE,0xE9,
|
||||
+ 0x2B,0x04,
|
||||
+ 0xA3,0xE8,0xEB,0x3C,0xC1,0xCF,0xE7,0xB7,0x73,0x22, /* x */
|
||||
+ 0x13,0xB2,0x3A,0x65,0x61,0x49,0xAF,0xA1,0x42,0xC4,
|
||||
+ 0x7A,0xAF,0xBC,0x2B,0x79,0xA1,0x91,0x56,0x2E,0x13,
|
||||
+ 0x05,0xF4,
|
||||
+ 0x2D,0x99,0x6C,0x82,0x34,0x39,0xC5,0x6D,0x7F,0x7B, /* y */
|
||||
+ 0x22,0xE1,0x46,0x44,0x41,0x7E,0x69,0xBC,0xB6,0xDE,
|
||||
+ 0x39,0xD0,0x27,0x00,0x1D,0xAB,0xE8,0xF3,0x5B,0x25,
|
||||
+ 0xC9,0xBE,
|
||||
+ 0xA9,0xFB,0x57,0xDB,0xA1,0xEE,0xA9,0xBC,0x3E,0x66, /* order */
|
||||
+ 0x0A,0x90,0x9D,0x83,0x8D,0x71,0x8C,0x39,0x7A,0xA3,
|
||||
+ 0xB5,0x61,0xA6,0xF7,0x90,0x1E,0x0E,0x82,0x97,0x48,
|
||||
+ 0x56,0xA7 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+40*6]; }
|
||||
+ _EC_brainpoolP320r1 = {
|
||||
+ { NID_X9_62_prime_field, 0,40,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xD3,0x5E,0x47,0x20,0x36,0xBC,0x4F,0xB7,0xE1,0x3C, /* p */
|
||||
+ 0x78,0x5E,0xD2,0x01,0xE0,0x65,0xF9,0x8F,0xCF,0xA6,
|
||||
+ 0xF6,0xF4,0x0D,0xEF,0x4F,0x92,0xB9,0xEC,0x78,0x93,
|
||||
+ 0xEC,0x28,0xFC,0xD4,0x12,0xB1,0xF1,0xB3,0x2E,0x27,
|
||||
+ 0x3E,0xE3,0x0B,0x56,0x8F,0xBA,0xB0,0xF8,0x83,0xCC, /* a */
|
||||
+ 0xEB,0xD4,0x6D,0x3F,0x3B,0xB8,0xA2,0xA7,0x35,0x13,
|
||||
+ 0xF5,0xEB,0x79,0xDA,0x66,0x19,0x0E,0xB0,0x85,0xFF,
|
||||
+ 0xA9,0xF4,0x92,0xF3,0x75,0xA9,0x7D,0x86,0x0E,0xB4,
|
||||
+ 0x52,0x08,0x83,0x94,0x9D,0xFD,0xBC,0x42,0xD3,0xAD, /* b */
|
||||
+ 0x19,0x86,0x40,0x68,0x8A,0x6F,0xE1,0x3F,0x41,0x34,
|
||||
+ 0x95,0x54,0xB4,0x9A,0xCC,0x31,0xDC,0xCD,0x88,0x45,
|
||||
+ 0x39,0x81,0x6F,0x5E,0xB4,0xAC,0x8F,0xB1,0xF1,0xA6,
|
||||
+ 0x43,0xBD,0x7E,0x9A,0xFB,0x53,0xD8,0xB8,0x52,0x89, /* x */
|
||||
+ 0xBC,0xC4,0x8E,0xE5,0xBF,0xE6,0xF2,0x01,0x37,0xD1,
|
||||
+ 0x0A,0x08,0x7E,0xB6,0xE7,0x87,0x1E,0x2A,0x10,0xA5,
|
||||
+ 0x99,0xC7,0x10,0xAF,0x8D,0x0D,0x39,0xE2,0x06,0x11,
|
||||
+ 0x14,0xFD,0xD0,0x55,0x45,0xEC,0x1C,0xC8,0xAB,0x40, /* y */
|
||||
+ 0x93,0x24,0x7F,0x77,0x27,0x5E,0x07,0x43,0xFF,0xED,
|
||||
+ 0x11,0x71,0x82,0xEA,0xA9,0xC7,0x78,0x77,0xAA,0xAC,
|
||||
+ 0x6A,0xC7,0xD3,0x52,0x45,0xD1,0x69,0x2E,0x8E,0xE1,
|
||||
+ 0xD3,0x5E,0x47,0x20,0x36,0xBC,0x4F,0xB7,0xE1,0x3C, /* order */
|
||||
+ 0x78,0x5E,0xD2,0x01,0xE0,0x65,0xF9,0x8F,0xCF,0xA5,
|
||||
+ 0xB6,0x8F,0x12,0xA3,0x2D,0x48,0x2E,0xC7,0xEE,0x86,
|
||||
+ 0x58,0xE9,0x86,0x91,0x55,0x5B,0x44,0xC5,0x93,0x11 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+40*6]; }
|
||||
+ _EC_brainpoolP320t1 = {
|
||||
+ { NID_X9_62_prime_field, 0,40,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xD3,0x5E,0x47,0x20,0x36,0xBC,0x4F,0xB7,0xE1,0x3C, /* p */
|
||||
+ 0x78,0x5E,0xD2,0x01,0xE0,0x65,0xF9,0x8F,0xCF,0xA6,
|
||||
+ 0xF6,0xF4,0x0D,0xEF,0x4F,0x92,0xB9,0xEC,0x78,0x93,
|
||||
+ 0xEC,0x28,0xFC,0xD4,0x12,0xB1,0xF1,0xB3,0x2E,0x27,
|
||||
+ 0xD3,0x5E,0x47,0x20,0x36,0xBC,0x4F,0xB7,0xE1,0x3C, /* a */
|
||||
+ 0x78,0x5E,0xD2,0x01,0xE0,0x65,0xF9,0x8F,0xCF,0xA6,
|
||||
+ 0xF6,0xF4,0x0D,0xEF,0x4F,0x92,0xB9,0xEC,0x78,0x93,
|
||||
+ 0xEC,0x28,0xFC,0xD4,0x12,0xB1,0xF1,0xB3,0x2E,0x24,
|
||||
+ 0xA7,0xF5,0x61,0xE0,0x38,0xEB,0x1E,0xD5,0x60,0xB3, /* b */
|
||||
+ 0xD1,0x47,0xDB,0x78,0x20,0x13,0x06,0x4C,0x19,0xF2,
|
||||
+ 0x7E,0xD2,0x7C,0x67,0x80,0xAA,0xF7,0x7F,0xB8,0xA5,
|
||||
+ 0x47,0xCE,0xB5,0xB4,0xFE,0xF4,0x22,0x34,0x03,0x53,
|
||||
+ 0x92,0x5B,0xE9,0xFB,0x01,0xAF,0xC6,0xFB,0x4D,0x3E, /* x */
|
||||
+ 0x7D,0x49,0x90,0x01,0x0F,0x81,0x34,0x08,0xAB,0x10,
|
||||
+ 0x6C,0x4F,0x09,0xCB,0x7E,0xE0,0x78,0x68,0xCC,0x13,
|
||||
+ 0x6F,0xFF,0x33,0x57,0xF6,0x24,0xA2,0x1B,0xED,0x52,
|
||||
+ 0x63,0xBA,0x3A,0x7A,0x27,0x48,0x3E,0xBF,0x66,0x71, /* y */
|
||||
+ 0xDB,0xEF,0x7A,0xBB,0x30,0xEB,0xEE,0x08,0x4E,0x58,
|
||||
+ 0xA0,0xB0,0x77,0xAD,0x42,0xA5,0xA0,0x98,0x9D,0x1E,
|
||||
+ 0xE7,0x1B,0x1B,0x9B,0xC0,0x45,0x5F,0xB0,0xD2,0xC3,
|
||||
+ 0xD3,0x5E,0x47,0x20,0x36,0xBC,0x4F,0xB7,0xE1,0x3C, /* order */
|
||||
+ 0x78,0x5E,0xD2,0x01,0xE0,0x65,0xF9,0x8F,0xCF,0xA5,
|
||||
+ 0xB6,0x8F,0x12,0xA3,0x2D,0x48,0x2E,0xC7,0xEE,0x86,
|
||||
+ 0x58,0xE9,0x86,0x91,0x55,0x5B,0x44,0xC5,0x93,0x11 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+48*6]; }
|
||||
+ _EC_brainpoolP384r1 = {
|
||||
+ { NID_X9_62_prime_field, 0,48,1 },
|
||||
+ { /* no seed */
|
||||
+ 0x8C,0xB9,0x1E,0x82,0xA3,0x38,0x6D,0x28,0x0F,0x5D, /* p */
|
||||
+ 0x6F,0x7E,0x50,0xE6,0x41,0xDF,0x15,0x2F,0x71,0x09,
|
||||
+ 0xED,0x54,0x56,0xB4,0x12,0xB1,0xDA,0x19,0x7F,0xB7,
|
||||
+ 0x11,0x23,0xAC,0xD3,0xA7,0x29,0x90,0x1D,0x1A,0x71,
|
||||
+ 0x87,0x47,0x00,0x13,0x31,0x07,0xEC,0x53,
|
||||
+ 0x7B,0xC3,0x82,0xC6,0x3D,0x8C,0x15,0x0C,0x3C,0x72, /* a */
|
||||
+ 0x08,0x0A,0xCE,0x05,0xAF,0xA0,0xC2,0xBE,0xA2,0x8E,
|
||||
+ 0x4F,0xB2,0x27,0x87,0x13,0x91,0x65,0xEF,0xBA,0x91,
|
||||
+ 0xF9,0x0F,0x8A,0xA5,0x81,0x4A,0x50,0x3A,0xD4,0xEB,
|
||||
+ 0x04,0xA8,0xC7,0xDD,0x22,0xCE,0x28,0x26,
|
||||
+ 0x04,0xA8,0xC7,0xDD,0x22,0xCE,0x28,0x26,0x8B,0x39, /* b */
|
||||
+ 0xB5,0x54,0x16,0xF0,0x44,0x7C,0x2F,0xB7,0x7D,0xE1,
|
||||
+ 0x07,0xDC,0xD2,0xA6,0x2E,0x88,0x0E,0xA5,0x3E,0xEB,
|
||||
+ 0x62,0xD5,0x7C,0xB4,0x39,0x02,0x95,0xDB,0xC9,0x94,
|
||||
+ 0x3A,0xB7,0x86,0x96,0xFA,0x50,0x4C,0x11,
|
||||
+ 0x1D,0x1C,0x64,0xF0,0x68,0xCF,0x45,0xFF,0xA2,0xA6, /* x */
|
||||
+ 0x3A,0x81,0xB7,0xC1,0x3F,0x6B,0x88,0x47,0xA3,0xE7,
|
||||
+ 0x7E,0xF1,0x4F,0xE3,0xDB,0x7F,0xCA,0xFE,0x0C,0xBD,
|
||||
+ 0x10,0xE8,0xE8,0x26,0xE0,0x34,0x36,0xD6,0x46,0xAA,
|
||||
+ 0xEF,0x87,0xB2,0xE2,0x47,0xD4,0xAF,0x1E,
|
||||
+ 0x8A,0xBE,0x1D,0x75,0x20,0xF9,0xC2,0xA4,0x5C,0xB1, /* y */
|
||||
+ 0xEB,0x8E,0x95,0xCF,0xD5,0x52,0x62,0xB7,0x0B,0x29,
|
||||
+ 0xFE,0xEC,0x58,0x64,0xE1,0x9C,0x05,0x4F,0xF9,0x91,
|
||||
+ 0x29,0x28,0x0E,0x46,0x46,0x21,0x77,0x91,0x81,0x11,
|
||||
+ 0x42,0x82,0x03,0x41,0x26,0x3C,0x53,0x15,
|
||||
+ 0x8C,0xB9,0x1E,0x82,0xA3,0x38,0x6D,0x28,0x0F,0x5D, /* order */
|
||||
+ 0x6F,0x7E,0x50,0xE6,0x41,0xDF,0x15,0x2F,0x71,0x09,
|
||||
+ 0xED,0x54,0x56,0xB3,0x1F,0x16,0x6E,0x6C,0xAC,0x04,
|
||||
+ 0x25,0xA7,0xCF,0x3A,0xB6,0xAF,0x6B,0x7F,0xC3,0x10,
|
||||
+ 0x3B,0x88,0x32,0x02,0xE9,0x04,0x65,0x65 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+48*6]; }
|
||||
+ _EC_brainpoolP384t1 = {
|
||||
+ { NID_X9_62_prime_field, 0,48,1 },
|
||||
+ { /* no seed */
|
||||
+ 0x8C,0xB9,0x1E,0x82,0xA3,0x38,0x6D,0x28,0x0F,0x5D, /* p */
|
||||
+ 0x6F,0x7E,0x50,0xE6,0x41,0xDF,0x15,0x2F,0x71,0x09,
|
||||
+ 0xED,0x54,0x56,0xB4,0x12,0xB1,0xDA,0x19,0x7F,0xB7,
|
||||
+ 0x11,0x23,0xAC,0xD3,0xA7,0x29,0x90,0x1D,0x1A,0x71,
|
||||
+ 0x87,0x47,0x00,0x13,0x31,0x07,0xEC,0x53,
|
||||
+ 0x8C,0xB9,0x1E,0x82,0xA3,0x38,0x6D,0x28,0x0F,0x5D, /* a */
|
||||
+ 0x6F,0x7E,0x50,0xE6,0x41,0xDF,0x15,0x2F,0x71,0x09,
|
||||
+ 0xED,0x54,0x56,0xB4,0x12,0xB1,0xDA,0x19,0x7F,0xB7,
|
||||
+ 0x11,0x23,0xAC,0xD3,0xA7,0x29,0x90,0x1D,0x1A,0x71,
|
||||
+ 0x87,0x47,0x00,0x13,0x31,0x07,0xEC,0x50,
|
||||
+ 0x7F,0x51,0x9E,0xAD,0xA7,0xBD,0xA8,0x1B,0xD8,0x26, /* b */
|
||||
+ 0xDB,0xA6,0x47,0x91,0x0F,0x8C,0x4B,0x93,0x46,0xED,
|
||||
+ 0x8C,0xCD,0xC6,0x4E,0x4B,0x1A,0xBD,0x11,0x75,0x6D,
|
||||
+ 0xCE,0x1D,0x20,0x74,0xAA,0x26,0x3B,0x88,0x80,0x5C,
|
||||
+ 0xED,0x70,0x35,0x5A,0x33,0xB4,0x71,0xEE,
|
||||
+ 0x18,0xDE,0x98,0xB0,0x2D,0xB9,0xA3,0x06,0xF2,0xAF, /* x */
|
||||
+ 0xCD,0x72,0x35,0xF7,0x2A,0x81,0x9B,0x80,0xAB,0x12,
|
||||
+ 0xEB,0xD6,0x53,0x17,0x24,0x76,0xFE,0xCD,0x46,0x2A,
|
||||
+ 0xAB,0xFF,0xC4,0xFF,0x19,0x1B,0x94,0x6A,0x5F,0x54,
|
||||
+ 0xD8,0xD0,0xAA,0x2F,0x41,0x88,0x08,0xCC,
|
||||
+ 0x25,0xAB,0x05,0x69,0x62,0xD3,0x06,0x51,0xA1,0x14, /* y */
|
||||
+ 0xAF,0xD2,0x75,0x5A,0xD3,0x36,0x74,0x7F,0x93,0x47,
|
||||
+ 0x5B,0x7A,0x1F,0xCA,0x3B,0x88,0xF2,0xB6,0xA2,0x08,
|
||||
+ 0xCC,0xFE,0x46,0x94,0x08,0x58,0x4D,0xC2,0xB2,0x91,
|
||||
+ 0x26,0x75,0xBF,0x5B,0x9E,0x58,0x29,0x28,
|
||||
+ 0x8C,0xB9,0x1E,0x82,0xA3,0x38,0x6D,0x28,0x0F,0x5D, /* order */
|
||||
+ 0x6F,0x7E,0x50,0xE6,0x41,0xDF,0x15,0x2F,0x71,0x09,
|
||||
+ 0xED,0x54,0x56,0xB3,0x1F,0x16,0x6E,0x6C,0xAC,0x04,
|
||||
+ 0x25,0xA7,0xCF,0x3A,0xB6,0xAF,0x6B,0x7F,0xC3,0x10,
|
||||
+ 0x3B,0x88,0x32,0x02,0xE9,0x04,0x65,0x65 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+64*6]; }
|
||||
+ _EC_brainpoolP512r1 = {
|
||||
+ { NID_X9_62_prime_field, 0,64,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xAA,0xDD,0x9D,0xB8,0xDB,0xE9,0xC4,0x8B,0x3F,0xD4, /* p */
|
||||
+ 0xE6,0xAE,0x33,0xC9,0xFC,0x07,0xCB,0x30,0x8D,0xB3,
|
||||
+ 0xB3,0xC9,0xD2,0x0E,0xD6,0x63,0x9C,0xCA,0x70,0x33,
|
||||
+ 0x08,0x71,0x7D,0x4D,0x9B,0x00,0x9B,0xC6,0x68,0x42,
|
||||
+ 0xAE,0xCD,0xA1,0x2A,0xE6,0xA3,0x80,0xE6,0x28,0x81,
|
||||
+ 0xFF,0x2F,0x2D,0x82,0xC6,0x85,0x28,0xAA,0x60,0x56,
|
||||
+ 0x58,0x3A,0x48,0xF3,
|
||||
+ 0x78,0x30,0xA3,0x31,0x8B,0x60,0x3B,0x89,0xE2,0x32, /* a */
|
||||
+ 0x71,0x45,0xAC,0x23,0x4C,0xC5,0x94,0xCB,0xDD,0x8D,
|
||||
+ 0x3D,0xF9,0x16,0x10,0xA8,0x34,0x41,0xCA,0xEA,0x98,
|
||||
+ 0x63,0xBC,0x2D,0xED,0x5D,0x5A,0xA8,0x25,0x3A,0xA1,
|
||||
+ 0x0A,0x2E,0xF1,0xC9,0x8B,0x9A,0xC8,0xB5,0x7F,0x11,
|
||||
+ 0x17,0xA7,0x2B,0xF2,0xC7,0xB9,0xE7,0xC1,0xAC,0x4D,
|
||||
+ 0x77,0xFC,0x94,0xCA,
|
||||
+ 0x3D,0xF9,0x16,0x10,0xA8,0x34,0x41,0xCA,0xEA,0x98, /* b */
|
||||
+ 0x63,0xBC,0x2D,0xED,0x5D,0x5A,0xA8,0x25,0x3A,0xA1,
|
||||
+ 0x0A,0x2E,0xF1,0xC9,0x8B,0x9A,0xC8,0xB5,0x7F,0x11,
|
||||
+ 0x17,0xA7,0x2B,0xF2,0xC7,0xB9,0xE7,0xC1,0xAC,0x4D,
|
||||
+ 0x77,0xFC,0x94,0xCA,0xDC,0x08,0x3E,0x67,0x98,0x40,
|
||||
+ 0x50,0xB7,0x5E,0xBA,0xE5,0xDD,0x28,0x09,0xBD,0x63,
|
||||
+ 0x80,0x16,0xF7,0x23,
|
||||
+ 0x81,0xAE,0xE4,0xBD,0xD8,0x2E,0xD9,0x64,0x5A,0x21, /* x */
|
||||
+ 0x32,0x2E,0x9C,0x4C,0x6A,0x93,0x85,0xED,0x9F,0x70,
|
||||
+ 0xB5,0xD9,0x16,0xC1,0xB4,0x3B,0x62,0xEE,0xF4,0xD0,
|
||||
+ 0x09,0x8E,0xFF,0x3B,0x1F,0x78,0xE2,0xD0,0xD4,0x8D,
|
||||
+ 0x50,0xD1,0x68,0x7B,0x93,0xB9,0x7D,0x5F,0x7C,0x6D,
|
||||
+ 0x50,0x47,0x40,0x6A,0x5E,0x68,0x8B,0x35,0x22,0x09,
|
||||
+ 0xBC,0xB9,0xF8,0x22,
|
||||
+ 0x7D,0xDE,0x38,0x5D,0x56,0x63,0x32,0xEC,0xC0,0xEA, /* y */
|
||||
+ 0xBF,0xA9,0xCF,0x78,0x22,0xFD,0xF2,0x09,0xF7,0x00,
|
||||
+ 0x24,0xA5,0x7B,0x1A,0xA0,0x00,0xC5,0x5B,0x88,0x1F,
|
||||
+ 0x81,0x11,0xB2,0xDC,0xDE,0x49,0x4A,0x5F,0x48,0x5E,
|
||||
+ 0x5B,0xCA,0x4B,0xD8,0x8A,0x27,0x63,0xAE,0xD1,0xCA,
|
||||
+ 0x2B,0x2F,0xA8,0xF0,0x54,0x06,0x78,0xCD,0x1E,0x0F,
|
||||
+ 0x3A,0xD8,0x08,0x92,
|
||||
+ 0xAA,0xDD,0x9D,0xB8,0xDB,0xE9,0xC4,0x8B,0x3F,0xD4, /* order */
|
||||
+ 0xE6,0xAE,0x33,0xC9,0xFC,0x07,0xCB,0x30,0x8D,0xB3,
|
||||
+ 0xB3,0xC9,0xD2,0x0E,0xD6,0x63,0x9C,0xCA,0x70,0x33,
|
||||
+ 0x08,0x70,0x55,0x3E,0x5C,0x41,0x4C,0xA9,0x26,0x19,
|
||||
+ 0x41,0x86,0x61,0x19,0x7F,0xAC,0x10,0x47,0x1D,0xB1,
|
||||
+ 0xD3,0x81,0x08,0x5D,0xDA,0xDD,0xB5,0x87,0x96,0x82,
|
||||
+ 0x9C,0xA9,0x00,0x69 }
|
||||
+ };
|
||||
+
|
||||
+static const struct { EC_CURVE_DATA h; unsigned char data[0+64*6]; }
|
||||
+ _EC_brainpoolP512t1 = {
|
||||
+ { NID_X9_62_prime_field, 0,64,1 },
|
||||
+ { /* no seed */
|
||||
+ 0xAA,0xDD,0x9D,0xB8,0xDB,0xE9,0xC4,0x8B,0x3F,0xD4, /* p */
|
||||
+ 0xE6,0xAE,0x33,0xC9,0xFC,0x07,0xCB,0x30,0x8D,0xB3,
|
||||
+ 0xB3,0xC9,0xD2,0x0E,0xD6,0x63,0x9C,0xCA,0x70,0x33,
|
||||
+ 0x08,0x71,0x7D,0x4D,0x9B,0x00,0x9B,0xC6,0x68,0x42,
|
||||
+ 0xAE,0xCD,0xA1,0x2A,0xE6,0xA3,0x80,0xE6,0x28,0x81,
|
||||
+ 0xFF,0x2F,0x2D,0x82,0xC6,0x85,0x28,0xAA,0x60,0x56,
|
||||
+ 0x58,0x3A,0x48,0xF3,
|
||||
+ 0xAA,0xDD,0x9D,0xB8,0xDB,0xE9,0xC4,0x8B,0x3F,0xD4, /* a */
|
||||
+ 0xE6,0xAE,0x33,0xC9,0xFC,0x07,0xCB,0x30,0x8D,0xB3,
|
||||
+ 0xB3,0xC9,0xD2,0x0E,0xD6,0x63,0x9C,0xCA,0x70,0x33,
|
||||
+ 0x08,0x71,0x7D,0x4D,0x9B,0x00,0x9B,0xC6,0x68,0x42,
|
||||
+ 0xAE,0xCD,0xA1,0x2A,0xE6,0xA3,0x80,0xE6,0x28,0x81,
|
||||
+ 0xFF,0x2F,0x2D,0x82,0xC6,0x85,0x28,0xAA,0x60,0x56,
|
||||
+ 0x58,0x3A,0x48,0xF0,
|
||||
+ 0x7C,0xBB,0xBC,0xF9,0x44,0x1C,0xFA,0xB7,0x6E,0x18, /* b */
|
||||
+ 0x90,0xE4,0x68,0x84,0xEA,0xE3,0x21,0xF7,0x0C,0x0B,
|
||||
+ 0xCB,0x49,0x81,0x52,0x78,0x97,0x50,0x4B,0xEC,0x3E,
|
||||
+ 0x36,0xA6,0x2B,0xCD,0xFA,0x23,0x04,0x97,0x65,0x40,
|
||||
+ 0xF6,0x45,0x00,0x85,0xF2,0xDA,0xE1,0x45,0xC2,0x25,
|
||||
+ 0x53,0xB4,0x65,0x76,0x36,0x89,0x18,0x0E,0xA2,0x57,
|
||||
+ 0x18,0x67,0x42,0x3E,
|
||||
+ 0x64,0x0E,0xCE,0x5C,0x12,0x78,0x87,0x17,0xB9,0xC1, /* x */
|
||||
+ 0xBA,0x06,0xCB,0xC2,0xA6,0xFE,0xBA,0x85,0x84,0x24,
|
||||
+ 0x58,0xC5,0x6D,0xDE,0x9D,0xB1,0x75,0x8D,0x39,0xC0,
|
||||
+ 0x31,0x3D,0x82,0xBA,0x51,0x73,0x5C,0xDB,0x3E,0xA4,
|
||||
+ 0x99,0xAA,0x77,0xA7,0xD6,0x94,0x3A,0x64,0xF7,0xA3,
|
||||
+ 0xF2,0x5F,0xE2,0x6F,0x06,0xB5,0x1B,0xAA,0x26,0x96,
|
||||
+ 0xFA,0x90,0x35,0xDA,
|
||||
+ 0x5B,0x53,0x4B,0xD5,0x95,0xF5,0xAF,0x0F,0xA2,0xC8, /* y */
|
||||
+ 0x92,0x37,0x6C,0x84,0xAC,0xE1,0xBB,0x4E,0x30,0x19,
|
||||
+ 0xB7,0x16,0x34,0xC0,0x11,0x31,0x15,0x9C,0xAE,0x03,
|
||||
+ 0xCE,0xE9,0xD9,0x93,0x21,0x84,0xBE,0xEF,0x21,0x6B,
|
||||
+ 0xD7,0x1D,0xF2,0xDA,0xDF,0x86,0xA6,0x27,0x30,0x6E,
|
||||
+ 0xCF,0xF9,0x6D,0xBB,0x8B,0xAC,0xE1,0x98,0xB6,0x1E,
|
||||
+ 0x00,0xF8,0xB3,0x32,
|
||||
+ 0xAA,0xDD,0x9D,0xB8,0xDB,0xE9,0xC4,0x8B,0x3F,0xD4, /* order */
|
||||
+ 0xE6,0xAE,0x33,0xC9,0xFC,0x07,0xCB,0x30,0x8D,0xB3,
|
||||
+ 0xB3,0xC9,0xD2,0x0E,0xD6,0x63,0x9C,0xCA,0x70,0x33,
|
||||
+ 0x08,0x70,0x55,0x3E,0x5C,0x41,0x4C,0xA9,0x26,0x19,
|
||||
+ 0x41,0x86,0x61,0x19,0x7F,0xAC,0x10,0x47,0x1D,0xB1,
|
||||
+ 0xD3,0x81,0x08,0x5D,0xDA,0xDD,0xB5,0x87,0x96,0x82,
|
||||
+ 0x9C,0xA9,0x00,0x69 }
|
||||
+ };
|
||||
+
|
||||
typedef struct _ec_list_element_st {
|
||||
int nid;
|
||||
const EC_CURVE_DATA *data;
|
||||
@@ -1928,6 +2356,21 @@ static const ec_list_element curve_list[] = {
|
||||
{ NID_ipsec4, &_EC_IPSEC_185_ID4.h, 0, "\n\tIPSec/IKE/Oakley curve #4 over a 185 bit binary field.\n"
|
||||
"\tNot suitable for ECDSA.\n\tQuestionable extension field!" },
|
||||
#endif
|
||||
+ /* brainpool curves */
|
||||
+ { NID_brainpoolP160r1, &_EC_brainpoolP160r1.h, 0, "RFC 5639 curve over a 160 bit prime field"},
|
||||
+ { NID_brainpoolP160t1, &_EC_brainpoolP160t1.h, 0, "RFC 5639 curve over a 160 bit prime field"},
|
||||
+ { NID_brainpoolP192r1, &_EC_brainpoolP192r1.h, 0, "RFC 5639 curve over a 192 bit prime field"},
|
||||
+ { NID_brainpoolP192t1, &_EC_brainpoolP192t1.h, 0, "RFC 5639 curve over a 192 bit prime field"},
|
||||
+ { NID_brainpoolP224r1, &_EC_brainpoolP224r1.h, 0, "RFC 5639 curve over a 224 bit prime field"},
|
||||
+ { NID_brainpoolP224t1, &_EC_brainpoolP224t1.h, 0, "RFC 5639 curve over a 224 bit prime field"},
|
||||
+ { NID_brainpoolP256r1, &_EC_brainpoolP256r1.h, 0, "RFC 5639 curve over a 256 bit prime field"},
|
||||
+ { NID_brainpoolP256t1, &_EC_brainpoolP256t1.h, 0, "RFC 5639 curve over a 256 bit prime field"},
|
||||
+ { NID_brainpoolP320r1, &_EC_brainpoolP320r1.h, 0, "RFC 5639 curve over a 320 bit prime field"},
|
||||
+ { NID_brainpoolP320t1, &_EC_brainpoolP320t1.h, 0, "RFC 5639 curve over a 320 bit prime field"},
|
||||
+ { NID_brainpoolP384r1, &_EC_brainpoolP384r1.h, 0, "RFC 5639 curve over a 384 bit prime field"},
|
||||
+ { NID_brainpoolP384t1, &_EC_brainpoolP384t1.h, 0, "RFC 5639 curve over a 384 bit prime field"},
|
||||
+ { NID_brainpoolP512r1, &_EC_brainpoolP512r1.h, 0, "RFC 5639 curve over a 512 bit prime field"},
|
||||
+ { NID_brainpoolP512t1, &_EC_brainpoolP512t1.h, 0, "RFC 5639 curve over a 512 bit prime field"},
|
||||
};
|
||||
|
||||
#define curve_list_length (sizeof(curve_list)/sizeof(ec_list_element))
|
||||
diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h
|
||||
index bc69665..cbc8d2c 100644
|
||||
--- a/crypto/objects/obj_dat.h
|
||||
+++ b/crypto/objects/obj_dat.h
|
||||
@@ -62,12 +62,12 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
-#define NUM_NID 920
|
||||
-#define NUM_SN 913
|
||||
-#define NUM_LN 913
|
||||
-#define NUM_OBJ 857
|
||||
+#define NUM_NID 935
|
||||
+#define NUM_SN 928
|
||||
+#define NUM_LN 928
|
||||
+#define NUM_OBJ 872
|
||||
|
||||
-static const unsigned char lvalues[5974]={
|
||||
+static const unsigned char lvalues[6107]={
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 0] OBJ_rsadsi */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 6] OBJ_pkcs */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 13] OBJ_md2 */
|
||||
@@ -919,6 +919,21 @@ static const unsigned char lvalues[5974]={
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x08,/* [5946] OBJ_mgf1 */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x0A,/* [5955] OBJ_rsassaPss */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x07,/* [5964] OBJ_rsaesOaep */
|
||||
+0x2A,0x86,0x48,0xCE,0x3E,0x02,0x01, /* [5973] OBJ_dhpublicnumber */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x01,/* [5980] OBJ_brainpoolP160r1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x02,/* [5989] OBJ_brainpoolP160t1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x03,/* [5998] OBJ_brainpoolP192r1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x04,/* [6007] OBJ_brainpoolP192t1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x05,/* [6016] OBJ_brainpoolP224r1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x06,/* [6025] OBJ_brainpoolP224t1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x07,/* [6034] OBJ_brainpoolP256r1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x08,/* [6043] OBJ_brainpoolP256t1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x09,/* [6052] OBJ_brainpoolP320r1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x0A,/* [6061] OBJ_brainpoolP320t1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x0B,/* [6070] OBJ_brainpoolP384r1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x0C,/* [6079] OBJ_brainpoolP384t1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x0D,/* [6088] OBJ_brainpoolP512r1 */
|
||||
+0x2B,0x24,0x03,0x03,0x02,0x08,0x01,0x01,0x0E,/* [6097] OBJ_brainpoolP512t1 */
|
||||
};
|
||||
|
||||
static const ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
@@ -2399,6 +2414,35 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
{"AES-256-CBC-HMAC-SHA1","aes-256-cbc-hmac-sha1",
|
||||
NID_aes_256_cbc_hmac_sha1,0,NULL,0},
|
||||
{"RSAES-OAEP","rsaesOaep",NID_rsaesOaep,9,&(lvalues[5964]),0},
|
||||
+{"dhpublicnumber","X9.42 DH",NID_dhpublicnumber,7,&(lvalues[5973]),0},
|
||||
+{"brainpoolP160r1","brainpoolP160r1",NID_brainpoolP160r1,9,
|
||||
+ &(lvalues[5980]),0},
|
||||
+{"brainpoolP160t1","brainpoolP160t1",NID_brainpoolP160t1,9,
|
||||
+ &(lvalues[5989]),0},
|
||||
+{"brainpoolP192r1","brainpoolP192r1",NID_brainpoolP192r1,9,
|
||||
+ &(lvalues[5998]),0},
|
||||
+{"brainpoolP192t1","brainpoolP192t1",NID_brainpoolP192t1,9,
|
||||
+ &(lvalues[6007]),0},
|
||||
+{"brainpoolP224r1","brainpoolP224r1",NID_brainpoolP224r1,9,
|
||||
+ &(lvalues[6016]),0},
|
||||
+{"brainpoolP224t1","brainpoolP224t1",NID_brainpoolP224t1,9,
|
||||
+ &(lvalues[6025]),0},
|
||||
+{"brainpoolP256r1","brainpoolP256r1",NID_brainpoolP256r1,9,
|
||||
+ &(lvalues[6034]),0},
|
||||
+{"brainpoolP256t1","brainpoolP256t1",NID_brainpoolP256t1,9,
|
||||
+ &(lvalues[6043]),0},
|
||||
+{"brainpoolP320r1","brainpoolP320r1",NID_brainpoolP320r1,9,
|
||||
+ &(lvalues[6052]),0},
|
||||
+{"brainpoolP320t1","brainpoolP320t1",NID_brainpoolP320t1,9,
|
||||
+ &(lvalues[6061]),0},
|
||||
+{"brainpoolP384r1","brainpoolP384r1",NID_brainpoolP384r1,9,
|
||||
+ &(lvalues[6070]),0},
|
||||
+{"brainpoolP384t1","brainpoolP384t1",NID_brainpoolP384t1,9,
|
||||
+ &(lvalues[6079]),0},
|
||||
+{"brainpoolP512r1","brainpoolP512r1",NID_brainpoolP512r1,9,
|
||||
+ &(lvalues[6088]),0},
|
||||
+{"brainpoolP512t1","brainpoolP512t1",NID_brainpoolP512t1,9,
|
||||
+ &(lvalues[6097]),0},
|
||||
};
|
||||
|
||||
static const unsigned int sn_objs[NUM_SN]={
|
||||
@@ -2613,6 +2657,20 @@ static const unsigned int sn_objs[NUM_SN]={
|
||||
87, /* "basicConstraints" */
|
||||
365, /* "basicOCSPResponse" */
|
||||
285, /* "biometricInfo" */
|
||||
+921, /* "brainpoolP160r1" */
|
||||
+922, /* "brainpoolP160t1" */
|
||||
+923, /* "brainpoolP192r1" */
|
||||
+924, /* "brainpoolP192t1" */
|
||||
+925, /* "brainpoolP224r1" */
|
||||
+926, /* "brainpoolP224t1" */
|
||||
+927, /* "brainpoolP256r1" */
|
||||
+928, /* "brainpoolP256t1" */
|
||||
+929, /* "brainpoolP320r1" */
|
||||
+930, /* "brainpoolP320t1" */
|
||||
+931, /* "brainpoolP384r1" */
|
||||
+932, /* "brainpoolP384t1" */
|
||||
+933, /* "brainpoolP512r1" */
|
||||
+934, /* "brainpoolP512t1" */
|
||||
494, /* "buildingName" */
|
||||
860, /* "businessCategory" */
|
||||
691, /* "c2onb191v4" */
|
||||
@@ -2668,6 +2726,7 @@ static const unsigned int sn_objs[NUM_SN]={
|
||||
107, /* "description" */
|
||||
871, /* "destinationIndicator" */
|
||||
28, /* "dhKeyAgreement" */
|
||||
+920, /* "dhpublicnumber" */
|
||||
382, /* "directory" */
|
||||
887, /* "distinguishedName" */
|
||||
892, /* "dmdName" */
|
||||
@@ -3451,6 +3510,7 @@ static const unsigned int ln_objs[NUM_LN]={
|
||||
85, /* "X509v3 Subject Alternative Name" */
|
||||
769, /* "X509v3 Subject Directory Attributes" */
|
||||
82, /* "X509v3 Subject Key Identifier" */
|
||||
+920, /* "X9.42 DH" */
|
||||
184, /* "X9.57" */
|
||||
185, /* "X9.57 CM ?" */
|
||||
478, /* "aRecord" */
|
||||
@@ -3502,6 +3562,20 @@ static const unsigned int ln_objs[NUM_LN]={
|
||||
93, /* "bf-cfb" */
|
||||
92, /* "bf-ecb" */
|
||||
94, /* "bf-ofb" */
|
||||
+921, /* "brainpoolP160r1" */
|
||||
+922, /* "brainpoolP160t1" */
|
||||
+923, /* "brainpoolP192r1" */
|
||||
+924, /* "brainpoolP192t1" */
|
||||
+925, /* "brainpoolP224r1" */
|
||||
+926, /* "brainpoolP224t1" */
|
||||
+927, /* "brainpoolP256r1" */
|
||||
+928, /* "brainpoolP256t1" */
|
||||
+929, /* "brainpoolP320r1" */
|
||||
+930, /* "brainpoolP320t1" */
|
||||
+931, /* "brainpoolP384r1" */
|
||||
+932, /* "brainpoolP384t1" */
|
||||
+933, /* "brainpoolP512r1" */
|
||||
+934, /* "brainpoolP512t1" */
|
||||
494, /* "buildingName" */
|
||||
860, /* "businessCategory" */
|
||||
691, /* "c2onb191v4" */
|
||||
@@ -4608,6 +4682,7 @@ static const unsigned int obj_objs[NUM_OBJ]={
|
||||
416, /* OBJ_ecdsa_with_SHA1 1 2 840 10045 4 1 */
|
||||
791, /* OBJ_ecdsa_with_Recommended 1 2 840 10045 4 2 */
|
||||
792, /* OBJ_ecdsa_with_Specified 1 2 840 10045 4 3 */
|
||||
+920, /* OBJ_dhpublicnumber 1 2 840 10046 2 1 */
|
||||
258, /* OBJ_id_pkix_mod 1 3 6 1 5 5 7 0 */
|
||||
175, /* OBJ_id_pe 1 3 6 1 5 5 7 1 */
|
||||
259, /* OBJ_id_qt 1 3 6 1 5 5 7 2 */
|
||||
@@ -4886,6 +4961,20 @@ static const unsigned int obj_objs[NUM_OBJ]={
|
||||
373, /* OBJ_id_pkix_OCSP_valid 1 3 6 1 5 5 7 48 1 9 */
|
||||
374, /* OBJ_id_pkix_OCSP_path 1 3 6 1 5 5 7 48 1 10 */
|
||||
375, /* OBJ_id_pkix_OCSP_trustRoot 1 3 6 1 5 5 7 48 1 11 */
|
||||
+921, /* OBJ_brainpoolP160r1 1 3 36 3 3 2 8 1 1 1 */
|
||||
+922, /* OBJ_brainpoolP160t1 1 3 36 3 3 2 8 1 1 2 */
|
||||
+923, /* OBJ_brainpoolP192r1 1 3 36 3 3 2 8 1 1 3 */
|
||||
+924, /* OBJ_brainpoolP192t1 1 3 36 3 3 2 8 1 1 4 */
|
||||
+925, /* OBJ_brainpoolP224r1 1 3 36 3 3 2 8 1 1 5 */
|
||||
+926, /* OBJ_brainpoolP224t1 1 3 36 3 3 2 8 1 1 6 */
|
||||
+927, /* OBJ_brainpoolP256r1 1 3 36 3 3 2 8 1 1 7 */
|
||||
+928, /* OBJ_brainpoolP256t1 1 3 36 3 3 2 8 1 1 8 */
|
||||
+929, /* OBJ_brainpoolP320r1 1 3 36 3 3 2 8 1 1 9 */
|
||||
+930, /* OBJ_brainpoolP320t1 1 3 36 3 3 2 8 1 1 10 */
|
||||
+931, /* OBJ_brainpoolP384r1 1 3 36 3 3 2 8 1 1 11 */
|
||||
+932, /* OBJ_brainpoolP384t1 1 3 36 3 3 2 8 1 1 12 */
|
||||
+933, /* OBJ_brainpoolP512r1 1 3 36 3 3 2 8 1 1 13 */
|
||||
+934, /* OBJ_brainpoolP512t1 1 3 36 3 3 2 8 1 1 14 */
|
||||
418, /* OBJ_aes_128_ecb 2 16 840 1 101 3 4 1 1 */
|
||||
419, /* OBJ_aes_128_cbc 2 16 840 1 101 3 4 1 2 */
|
||||
420, /* OBJ_aes_128_ofb128 2 16 840 1 101 3 4 1 3 */
|
||||
diff --git a/crypto/objects/obj_mac.h b/crypto/objects/obj_mac.h
|
||||
index b5ea7cd..704697e 100644
|
||||
--- a/crypto/objects/obj_mac.h
|
||||
+++ b/crypto/objects/obj_mac.h
|
||||
@@ -4030,3 +4030,64 @@
|
||||
#define LN_aes_256_cbc_hmac_sha1 "aes-256-cbc-hmac-sha1"
|
||||
#define NID_aes_256_cbc_hmac_sha1 918
|
||||
|
||||
+#define SN_dhpublicnumber "dhpublicnumber"
|
||||
+#define LN_dhpublicnumber "X9.42 DH"
|
||||
+#define NID_dhpublicnumber 920
|
||||
+#define OBJ_dhpublicnumber OBJ_ISO_US,10046L,2L,1L
|
||||
+
|
||||
+#define SN_brainpoolP160r1 "brainpoolP160r1"
|
||||
+#define NID_brainpoolP160r1 921
|
||||
+#define OBJ_brainpoolP160r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,1L
|
||||
+
|
||||
+#define SN_brainpoolP160t1 "brainpoolP160t1"
|
||||
+#define NID_brainpoolP160t1 922
|
||||
+#define OBJ_brainpoolP160t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,2L
|
||||
+
|
||||
+#define SN_brainpoolP192r1 "brainpoolP192r1"
|
||||
+#define NID_brainpoolP192r1 923
|
||||
+#define OBJ_brainpoolP192r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,3L
|
||||
+
|
||||
+#define SN_brainpoolP192t1 "brainpoolP192t1"
|
||||
+#define NID_brainpoolP192t1 924
|
||||
+#define OBJ_brainpoolP192t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,4L
|
||||
+
|
||||
+#define SN_brainpoolP224r1 "brainpoolP224r1"
|
||||
+#define NID_brainpoolP224r1 925
|
||||
+#define OBJ_brainpoolP224r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,5L
|
||||
+
|
||||
+#define SN_brainpoolP224t1 "brainpoolP224t1"
|
||||
+#define NID_brainpoolP224t1 926
|
||||
+#define OBJ_brainpoolP224t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,6L
|
||||
+
|
||||
+#define SN_brainpoolP256r1 "brainpoolP256r1"
|
||||
+#define NID_brainpoolP256r1 927
|
||||
+#define OBJ_brainpoolP256r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,7L
|
||||
+
|
||||
+#define SN_brainpoolP256t1 "brainpoolP256t1"
|
||||
+#define NID_brainpoolP256t1 928
|
||||
+#define OBJ_brainpoolP256t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,8L
|
||||
+
|
||||
+#define SN_brainpoolP320r1 "brainpoolP320r1"
|
||||
+#define NID_brainpoolP320r1 929
|
||||
+#define OBJ_brainpoolP320r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,9L
|
||||
+
|
||||
+#define SN_brainpoolP320t1 "brainpoolP320t1"
|
||||
+#define NID_brainpoolP320t1 930
|
||||
+#define OBJ_brainpoolP320t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,10L
|
||||
+
|
||||
+#define SN_brainpoolP384r1 "brainpoolP384r1"
|
||||
+#define NID_brainpoolP384r1 931
|
||||
+#define OBJ_brainpoolP384r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,11L
|
||||
+
|
||||
+#define SN_brainpoolP384t1 "brainpoolP384t1"
|
||||
+#define NID_brainpoolP384t1 932
|
||||
+#define OBJ_brainpoolP384t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,12L
|
||||
+
|
||||
+#define SN_brainpoolP512r1 "brainpoolP512r1"
|
||||
+#define NID_brainpoolP512r1 933
|
||||
+#define OBJ_brainpoolP512r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,13L
|
||||
+
|
||||
+#define SN_brainpoolP512t1 "brainpoolP512t1"
|
||||
+#define NID_brainpoolP512t1 934
|
||||
+#define OBJ_brainpoolP512t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,14L
|
||||
+
|
||||
diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num
|
||||
index 1d0a7c8..9297435 100644
|
||||
--- a/crypto/objects/obj_mac.num
|
||||
+++ b/crypto/objects/obj_mac.num
|
||||
@@ -917,3 +917,18 @@ aes_128_cbc_hmac_sha1 916
|
||||
aes_192_cbc_hmac_sha1 917
|
||||
aes_256_cbc_hmac_sha1 918
|
||||
rsaesOaep 919
|
||||
+dhpublicnumber 920
|
||||
+brainpoolP160r1 921
|
||||
+brainpoolP160t1 922
|
||||
+brainpoolP192r1 923
|
||||
+brainpoolP192t1 924
|
||||
+brainpoolP224r1 925
|
||||
+brainpoolP224t1 926
|
||||
+brainpoolP256r1 927
|
||||
+brainpoolP256t1 928
|
||||
+brainpoolP320r1 929
|
||||
+brainpoolP320t1 930
|
||||
+brainpoolP384r1 931
|
||||
+brainpoolP384t1 932
|
||||
+brainpoolP512r1 933
|
||||
+brainpoolP512t1 934
|
||||
diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt
|
||||
index d3bfad7..23a955d 100644
|
||||
--- a/crypto/objects/objects.txt
|
||||
+++ b/crypto/objects/objects.txt
|
||||
@@ -1290,3 +1290,25 @@ kisa 1 6 : SEED-OFB : seed-ofb
|
||||
: AES-128-CBC-HMAC-SHA1 : aes-128-cbc-hmac-sha1
|
||||
: AES-192-CBC-HMAC-SHA1 : aes-192-cbc-hmac-sha1
|
||||
: AES-256-CBC-HMAC-SHA1 : aes-256-cbc-hmac-sha1
|
||||
+
|
||||
+ISO-US 10046 2 1 : dhpublicnumber : X9.42 DH
|
||||
+
|
||||
+# RFC 5639 curve OIDs (see http://www.ietf.org/rfc/rfc5639.txt)
|
||||
+# versionOne OBJECT IDENTIFIER ::= {
|
||||
+# iso(1) identifified-organization(3) teletrust(36) algorithm(3)
|
||||
+# signature-algorithm(3) ecSign(2) ecStdCurvesAndGeneration(8)
|
||||
+# ellipticCurve(1) 1 }
|
||||
+1 3 36 3 3 2 8 1 1 1 : brainpoolP160r1
|
||||
+1 3 36 3 3 2 8 1 1 2 : brainpoolP160t1
|
||||
+1 3 36 3 3 2 8 1 1 3 : brainpoolP192r1
|
||||
+1 3 36 3 3 2 8 1 1 4 : brainpoolP192t1
|
||||
+1 3 36 3 3 2 8 1 1 5 : brainpoolP224r1
|
||||
+1 3 36 3 3 2 8 1 1 6 : brainpoolP224t1
|
||||
+1 3 36 3 3 2 8 1 1 7 : brainpoolP256r1
|
||||
+1 3 36 3 3 2 8 1 1 8 : brainpoolP256t1
|
||||
+1 3 36 3 3 2 8 1 1 9 : brainpoolP320r1
|
||||
+1 3 36 3 3 2 8 1 1 10 : brainpoolP320t1
|
||||
+1 3 36 3 3 2 8 1 1 11 : brainpoolP384r1
|
||||
+1 3 36 3 3 2 8 1 1 12 : brainpoolP384t1
|
||||
+1 3 36 3 3 2 8 1 1 13 : brainpoolP512r1
|
||||
+1 3 36 3 3 2 8 1 1 14 : brainpoolP512t1
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
@ -57,20 +57,7 @@ void MainWindow::about()
|
||||
QString(), QString());
|
||||
about->aboutDialog(QPixmap(":scardImg"));
|
||||
QString openssl, qt, cont, version, brainpool;
|
||||
#ifndef OPENSSL_NO_EC
|
||||
#ifdef NID_brainpoolP160r1
|
||||
EC_GROUP *group = EC_GROUP_new_by_curve_name(NID_brainpoolP160r1);
|
||||
ign_openssl_error();
|
||||
if (group) {
|
||||
EC_GROUP_free(group);
|
||||
brainpool = "<p>ECC With RFC 5639 Brainpool curves"
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10002001L
|
||||
"<br/>(Backported to " OPENSSL_VERSION_TEXT ")"
|
||||
#endif
|
||||
;
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
#ifdef OPENSSL_NO_EC
|
||||
brainpool = "(Elliptic Curve Cryptography support disabled)";
|
||||
#endif
|
||||
openssl = SSLeay_version(SSLEAY_VERSION);
|
||||
|
||||
@ -19,8 +19,6 @@
|
||||
#include "lib/BioByteArray.h"
|
||||
#include "lib/func.h"
|
||||
|
||||
#include "lib/openssl_compat.h"
|
||||
|
||||
x509v3ext NewX509::getBasicConstraints()
|
||||
{
|
||||
QStringList cont;
|
||||
|
||||
@ -39,14 +39,9 @@ class DHgen: public QThread
|
||||
{
|
||||
DH *dh = NULL;
|
||||
try {
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
dh = DH_new();
|
||||
check_oom(dh);
|
||||
DH_generate_parameters_ex(dh, bits, 2, NULL);
|
||||
#else
|
||||
dh = DH_generate_parameters(bits, 2, NULL, NULL);
|
||||
check_oom(dh);
|
||||
#endif
|
||||
openssl_error();
|
||||
|
||||
XFile file(fname);
|
||||
|
||||
@ -59,21 +59,8 @@ bool hashBox::isInsecure() const
|
||||
|
||||
const EVP_MD *hashBox::currentHash() const
|
||||
{
|
||||
switch(key_type) {
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10000000L
|
||||
case EVP_PKEY_DSA:
|
||||
return EVP_dss1();
|
||||
#ifndef OPENSSL_NO_EC
|
||||
case EVP_PKEY_EC:
|
||||
return EVP_ecdsa();
|
||||
#endif
|
||||
#endif
|
||||
#ifdef EVP_PKEY_ED25519
|
||||
case EVP_PKEY_ED25519:
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
unsigned i= hashBox::currentHashIdx();
|
||||
unsigned i = hashBox::currentHashIdx();
|
||||
|
||||
if (i >= ARRAY_SIZE(hashalgos))
|
||||
i = DEFAULT_MD_IDX;
|
||||
return EVP_get_digestbynid(hashalgos[i].nid);
|
||||
@ -90,64 +77,6 @@ void hashBox::setCurrentString(QString md)
|
||||
}
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10000000L
|
||||
struct nid_triple {
|
||||
int alg; int hash; int sig;
|
||||
};
|
||||
|
||||
static const nid_triple sigoid_srt[] = {
|
||||
{NID_md2WithRSAEncryption, NID_md2, NID_rsaEncryption},
|
||||
{NID_md5WithRSAEncryption, NID_md5, NID_rsaEncryption},
|
||||
{NID_shaWithRSAEncryption, NID_sha, NID_rsaEncryption},
|
||||
{NID_sha1WithRSAEncryption, NID_sha1, NID_rsaEncryption},
|
||||
{NID_dsaWithSHA, NID_sha, NID_dsa},
|
||||
{NID_dsaWithSHA1_2, NID_sha1, NID_dsa_2},
|
||||
{NID_mdc2WithRSA, NID_mdc2, NID_rsaEncryption},
|
||||
{NID_md5WithRSA, NID_md5, NID_rsa},
|
||||
{NID_dsaWithSHA1, NID_sha1, NID_dsa},
|
||||
{NID_sha1WithRSA, NID_sha1, NID_rsa},
|
||||
{NID_ripemd160WithRSA, NID_ripemd160, NID_rsaEncryption},
|
||||
{NID_md4WithRSAEncryption, NID_md4, NID_rsaEncryption},
|
||||
{NID_ecdsa_with_SHA1, NID_sha1, NID_X9_62_id_ecPublicKey},
|
||||
{NID_sha256WithRSAEncryption, NID_sha256, NID_rsaEncryption},
|
||||
{NID_sha384WithRSAEncryption, NID_sha384, NID_rsaEncryption},
|
||||
{NID_sha512WithRSAEncryption, NID_sha512, NID_rsaEncryption},
|
||||
{NID_sha224WithRSAEncryption, NID_sha224, NID_rsaEncryption},
|
||||
{NID_ecdsa_with_Recommended, NID_undef, NID_X9_62_id_ecPublicKey},
|
||||
{NID_ecdsa_with_Specified, NID_undef, NID_X9_62_id_ecPublicKey},
|
||||
{NID_ecdsa_with_SHA224, NID_sha224, NID_X9_62_id_ecPublicKey},
|
||||
{NID_ecdsa_with_SHA256, NID_sha256, NID_X9_62_id_ecPublicKey},
|
||||
{NID_ecdsa_with_SHA384, NID_sha384, NID_X9_62_id_ecPublicKey},
|
||||
{NID_ecdsa_with_SHA512, NID_sha512, NID_X9_62_id_ecPublicKey},
|
||||
{NID_dsa_with_SHA224, NID_sha224, NID_dsa},
|
||||
{NID_dsa_with_SHA256, NID_sha256, NID_dsa},
|
||||
{NID_id_GostR3411_94_with_GostR3410_2001, NID_id_GostR3411_94,
|
||||
NID_id_GostR3410_2001},
|
||||
{NID_id_GostR3411_94_with_GostR3410_94, NID_id_GostR3411_94,
|
||||
NID_id_GostR3410_94},
|
||||
{NID_id_GostR3411_94_with_GostR3410_94_cc, NID_id_GostR3411_94,
|
||||
NID_id_GostR3410_94_cc},
|
||||
{NID_id_GostR3411_94_with_GostR3410_2001_cc, NID_id_GostR3411_94,
|
||||
NID_id_GostR3410_2001_cc},
|
||||
};
|
||||
|
||||
static int OBJ_find_sigid_algs(int alg, int *hash, int *sig)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i=0; i< ARRAY_SIZE(sigoid_srt); i++) {
|
||||
if (sigoid_srt[i].alg == alg) {
|
||||
if (hash)
|
||||
*hash = sigoid_srt[i].hash;
|
||||
if (sig)
|
||||
*sig = sigoid_srt[i].sig;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void hashBox::setCurrentMD(const EVP_MD *md)
|
||||
{
|
||||
int hash_nid;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user