Fix a printf type mismatch in attributes_match() reported by Coverity,
and a possible uninitizlied use of key_type in add_certificate()
reported by clang.
[ghudson@mit.edu: squashed commits and rewrote commit message]
}
}
if (match == 0) {
- st_logf("type %d attribute have no match\n", attributes[i].type);
+ st_logf("type %lu attribute have no match\n", attributes[i].type);
return 0;
}
}
key_type = CKK_DSA;
break;
default:
- /* XXX */
- break;
+ st_logf("invalid key_type\n");
+ ret = CKR_GENERAL_ERROR;
+ goto out;
}
c = CKO_CERTIFICATE;