better language in error, make nounce more random

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24052 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-11-29 19:34:11 +00:00
parent 174cae0ba1
commit e6f8e55360

View File

@@ -139,7 +139,7 @@ find_cert(krb5_context context, struct krb5_pk_identity *id,
struct certfind cf[3] = { struct certfind cf[3] = {
{ "PKINIT EKU" }, { "PKINIT EKU" },
{ "MS EKU" }, { "MS EKU" },
{ "no" } { "any (or no)" }
}; };
int i, ret; int i, ret;
@@ -159,7 +159,7 @@ find_cert(krb5_context context, struct krb5_pk_identity *id,
if (ret == 0) if (ret == 0)
break; break;
pk_copy_error(context, id->hx509ctx, ret, pk_copy_error(context, id->hx509ctx, ret,
"Failed cert for finding %s OID", cf[i].type); "Failed finding certificate with %s OID", cf[i].type);
} }
return ret; return ret;
} }
@@ -385,7 +385,7 @@ build_auth_pack(krb5_context context,
krb5_clear_error_message(context); krb5_clear_error_message(context);
return ret; return ret;
} }
memset(a->clientDHNonce->data, 0, a->clientDHNonce->length); RAND_bytes(a->clientDHNonce->data, a->clientDHNonce->length);
ret = krb5_copy_data(context, a->clientDHNonce, ret = krb5_copy_data(context, a->clientDHNonce,
&ctx->clientDHNonce); &ctx->clientDHNonce);
if (ret) if (ret)