use unsigned int as counter to fit better with the asn1 compiler
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19166 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -2139,9 +2139,11 @@ hx509_crypto_select(const hx509_context context,
|
||||
def = hx509_signature_sha1();
|
||||
} else if (type == HX509_SELECT_PUBLIC_SIG) {
|
||||
bits = SIG_PUBLIC_SIG;
|
||||
def = hx509_signature_rsa_with_sha1(); /* XXX depend on `source<63> and `peer<65> */
|
||||
/* XXX depend on `source<63> and `peer<65> */
|
||||
def = hx509_signature_rsa_with_sha1();
|
||||
} else {
|
||||
hx509_set_error_string(context, 0, EINVAL, "unknown type %d of selection", type);
|
||||
hx509_set_error_string(context, 0, EINVAL,
|
||||
"Unknown type %d of selection", type);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
@@ -2152,7 +2154,8 @@ hx509_crypto_select(const hx509_context context,
|
||||
for (j = 0; sig_algs[j]; j++) {
|
||||
if ((sig_algs[j]->flags & bits) != bits)
|
||||
continue;
|
||||
if (der_heim_oid_cmp((*sig_algs[j]->sig_oid)(), &peer->val[i].algorithm) != 0)
|
||||
if (der_heim_oid_cmp((*sig_algs[j]->sig_oid)(),
|
||||
&peer->val[i].algorithm) != 0)
|
||||
continue;
|
||||
if (keytype && sig_algs[j]->key_oid &&
|
||||
der_heim_oid_cmp(keytype, (*sig_algs[j]->key_oid)()))
|
||||
@@ -2179,10 +2182,10 @@ hx509_crypto_available(hx509_context context,
|
||||
int type,
|
||||
hx509_cert source,
|
||||
AlgorithmIdentifier **val,
|
||||
size_t *plen)
|
||||
unsigned int *plen)
|
||||
{
|
||||
const heim_oid *keytype = NULL;
|
||||
size_t len, i;
|
||||
unsigned int len, i;
|
||||
void *ptr;
|
||||
int bits, ret;
|
||||
|
||||
@@ -2195,7 +2198,8 @@ hx509_crypto_available(hx509_context context,
|
||||
} else if (type == HX509_SELECT_PUBLIC_SIG) {
|
||||
bits = SIG_PUBLIC_SIG;
|
||||
} else {
|
||||
hx509_set_error_string(context, 0, EINVAL, "unknown type %d of available", type);
|
||||
hx509_set_error_string(context, 0, EINVAL,
|
||||
"Unknown type %d of available", type);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
@@ -2238,9 +2242,9 @@ out:
|
||||
|
||||
void
|
||||
hx509_crypto_free_algs(AlgorithmIdentifier *val,
|
||||
size_t len)
|
||||
unsigned int len)
|
||||
{
|
||||
size_t i;
|
||||
unsigned int i;
|
||||
for (i = 0; i < len; i++)
|
||||
free_AlgorithmIdentifier(&val[i]);
|
||||
free(val);
|
||||
|
@@ -993,10 +993,9 @@ random_data(void *opt, int argc, char **argv)
|
||||
int
|
||||
crypto_available(struct crypto_available_options *opt, int argc, char **argv)
|
||||
{
|
||||
int ret;
|
||||
size_t len, i;
|
||||
AlgorithmIdentifier *val;
|
||||
int type = HX509_SELECT_ALL;
|
||||
unsigned int len, i;
|
||||
int ret, type;
|
||||
|
||||
if (opt->type_string) {
|
||||
if (strcmp(opt->type_string, "all") == 0)
|
||||
@@ -1007,7 +1006,8 @@ crypto_available(struct crypto_available_options *opt, int argc, char **argv)
|
||||
type = HX509_SELECT_PUBLIC_SIG;
|
||||
else
|
||||
errx(1, "unknown type: %s", opt->type_string);
|
||||
}
|
||||
} else
|
||||
type = HX509_SELECT_ALL;
|
||||
|
||||
ret = hx509_crypto_available(context, type, NULL, &val, &len);
|
||||
if (ret)
|
||||
@@ -1030,9 +1030,8 @@ crypto_select(struct crypto_select_options *opt, int argc, char **argv)
|
||||
{
|
||||
hx509_peer_info peer = NULL;
|
||||
AlgorithmIdentifier selected;
|
||||
int ret;
|
||||
int ret, type;
|
||||
char *s;
|
||||
int type = HX509_SELECT_DIGEST;
|
||||
|
||||
if (opt->type_string) {
|
||||
if (strcmp(opt->type_string, "digest") == 0)
|
||||
@@ -1041,7 +1040,8 @@ crypto_select(struct crypto_select_options *opt, int argc, char **argv)
|
||||
type = HX509_SELECT_PUBLIC_SIG;
|
||||
else
|
||||
errx(1, "unknown type: %s", opt->type_string);
|
||||
}
|
||||
} else
|
||||
type = HX509_SELECT_DIGEST;
|
||||
|
||||
if (opt->peer_cmstype_strings.num_strings) {
|
||||
AlgorithmIdentifier *val;
|
||||
|
Reference in New Issue
Block a user