summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/x509
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-10-01 12:32:41 +0000
committernectar <nectar@FreeBSD.org>2003-10-01 12:32:41 +0000
commitee25ce74b3f6742c1079590363995e56ff51b014 (patch)
tree69b3ffc611270d72c473248fe700c2942eb5e6b5 /crypto/openssl/crypto/x509
parent5d79b842c13e718f85a9f2e1676e361b6fc55367 (diff)
downloadFreeBSD-src-ee25ce74b3f6742c1079590363995e56ff51b014.zip
FreeBSD-src-ee25ce74b3f6742c1079590363995e56ff51b014.tar.gz
Vendor import of OpenSSL 0.9.7c
Diffstat (limited to 'crypto/openssl/crypto/x509')
-rw-r--r--crypto/openssl/crypto/x509/by_file.c3
-rw-r--r--crypto/openssl/crypto/x509/x509_trs.c1
-rw-r--r--crypto/openssl/crypto/x509/x509_vfy.c6
-rw-r--r--crypto/openssl/crypto/x509/x509type.c5
4 files changed, 9 insertions, 6 deletions
diff --git a/crypto/openssl/crypto/x509/by_file.c b/crypto/openssl/crypto/x509/by_file.c
index 22be90c..b4b0418 100644
--- a/crypto/openssl/crypto/x509/by_file.c
+++ b/crypto/openssl/crypto/x509/by_file.c
@@ -285,7 +285,8 @@ int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type)
if(itmp->x509) {
X509_STORE_add_cert(ctx->store_ctx, itmp->x509);
count++;
- } else if(itmp->crl) {
+ }
+ if(itmp->crl) {
X509_STORE_add_crl(ctx->store_ctx, itmp->crl);
count++;
}
diff --git a/crypto/openssl/crypto/x509/x509_trs.c b/crypto/openssl/crypto/x509/x509_trs.c
index 17d69ac..8812526 100644
--- a/crypto/openssl/crypto/x509/x509_trs.c
+++ b/crypto/openssl/crypto/x509/x509_trs.c
@@ -82,6 +82,7 @@ static X509_TRUST trstandard[] = {
{X509_TRUST_SSL_CLIENT, 0, trust_1oidany, "SSL Client", NID_client_auth, NULL},
{X509_TRUST_SSL_SERVER, 0, trust_1oidany, "SSL Server", NID_server_auth, NULL},
{X509_TRUST_EMAIL, 0, trust_1oidany, "S/MIME email", NID_email_protect, NULL},
+{X509_TRUST_OBJECT_SIGN, 0, trust_1oidany, "Object Signer", NID_code_sign, NULL},
{X509_TRUST_OCSP_SIGN, 0, trust_1oid, "OCSP responder", NID_OCSP_sign, NULL},
{X509_TRUST_OCSP_REQUEST, 0, trust_1oid, "OCSP request", NID_ad_OCSP, NULL}
};
diff --git a/crypto/openssl/crypto/x509/x509_vfy.c b/crypto/openssl/crypto/x509/x509_vfy.c
index 552d1e7..2bb21b4 100644
--- a/crypto/openssl/crypto/x509/x509_vfy.c
+++ b/crypto/openssl/crypto/x509/x509_vfy.c
@@ -453,9 +453,9 @@ static int check_revocation(X509_STORE_CTX *ctx)
if (!(ctx->flags & X509_V_FLAG_CRL_CHECK))
return 1;
if (ctx->flags & X509_V_FLAG_CRL_CHECK_ALL)
- last = 0;
- else
last = sk_X509_num(ctx->chain) - 1;
+ else
+ last = 0;
for(i = 0; i <= last; i++)
{
ctx->error_depth = i;
@@ -674,7 +674,7 @@ static int internal_verify(X509_STORE_CTX *ctx)
ok=(*cb)(0,ctx);
if (!ok) goto end;
}
- if (X509_verify(xs,pkey) <= 0)
+ else if (X509_verify(xs,pkey) <= 0)
/* XXX For the final trusted self-signed cert,
* this is a waste of time. That check should
* optional so that e.g. 'openssl x509' can be
diff --git a/crypto/openssl/crypto/x509/x509type.c b/crypto/openssl/crypto/x509/x509type.c
index 8e78b34..f78c2a6 100644
--- a/crypto/openssl/crypto/x509/x509type.c
+++ b/crypto/openssl/crypto/x509/x509type.c
@@ -99,14 +99,15 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey)
case EVP_PKEY_RSA:
ret|=EVP_PKS_RSA;
break;
- case EVP_PKS_DSA:
+ case EVP_PKEY_DSA:
ret|=EVP_PKS_DSA;
break;
default:
break;
}
- if (EVP_PKEY_size(pk) <= 512)
+ if (EVP_PKEY_size(pk) <= 512/8) /* /8 because it's 512 bits we look
+ for, not bytes */
ret|=EVP_PKT_EXP;
if(pkey==NULL) EVP_PKEY_free(pk);
return(ret);
OpenPOWER on IntegriCloud