Comment 229 for bug 296867

Revision history for this message
In , Simon McVittie (smcv) wrote :

> fp_data = g_variant_get_data (fp_variant);
> fp = otrl_context_find_fingerprint (context, (guchar *) fp_data, 0, NULL);

I'm still considering "use string fingerprints with error-checking" to be a merge blocker, because I don't think this code is OK for the case where fp_data has length != 20 bytes. I think TrustFingerprint("DEADBEEF") should raise InvalidArgument, whereas TrustFingerprint("12345678 12345678 12345678123456781234578") (with any whitespace) should work.

If you strongly prefer the binary encoding, I'd be OK with making TrustFingerprint([a number of bytes other than 20]) an InvalidArgument, but I think string fingerprints are going to be nicer to deal with.