Closed Bug 384246 Opened 15 years ago Closed 14 years ago

Add Link Fingerprints as a stream converter


(Core :: Networking, enhancement)

Not set





(Reporter: Mardak, Assigned: Mardak)


(Blocks 1 open bug)



(1 file, 1 obsolete file)

Attached patch v1 (obsolete) — Splinter Review
Create a special stream converter that acts like a passthrough but will generate a error status OnStop if the Link Fingerprint failed. It also returns an error code early if the expected fingerprint is the wrong length or uses non-hex characters.

Supports 2 hash types: md5 and sha256 by using nsICryptoHash;1

Provides 2 public static methods..

URIHasLinkFingerprint and PushConverterIfNecessary for use by channels
Attachment #268176 - Flags: review?(cbiesinger)
Blocks: 384247
Blocks: 384249
Blocks: 385090
Comment on attachment 268176 [details] [diff] [review]

in general, okay.  no need to abstract any more than what edilee is doing.  Lets get a #define going so that we can enable/disable at build time.

also, it would be nice to have everything in one patch.

I gave edilee some comments about the patch (mostly nits).
Link Fingerprints backend: Bug 384246 (this bug)
Producers: Bug 384247 (HTTP) and Bug 385090 (FTP)
Consumers: Bug 292481 (downloads) and Bug 384249 (web pages)

brendan, biesi: Should this whole stream converter be #defined out or should it be the localized changes for "Producer" that actually use the Link Fingerprints stream converter (one-line changes to ns*Channel.cpp). The changes here only add a new isolated class which should affect very little by itself. The "Consumer" bugs depend on the new error code for this patch to compile, but they are benign without the "Producers" like HTTP to generate the error code.

dougt: Where would I put the all-in-one patch with the changes to get reviewed? Right now things are split into multiple pieces with their own dependencies (but only "downloads" has a 'real' depends). I assume this would need a superreview as well.

gerv: For the new nsLinkFingerprints.{h,cpp} files, I used the boilerplate and filled in some blanks, but does it need to be different for Summer of Code?
What you've put is fine, although I'd probably say:

* The Original Code is an implementation of Link Fingerprints.

I believe the rules of the SoC are that you retain the copyright (but if you aren't sure, please check). If so, you are the correct Initial Developer.

Attachment #268176 - Flags: review?(cbiesinger)
Attached patch v2Splinter Review
- General cleanup for nits and coding guidelines.
- Only recognize sha256
- Strict parsing of #fragment-id in getEntryAndHash (so no early failure)
Attachment #268176 - Attachment is obsolete: true
Bug 377245 got WONTFIXED, so switching this SoC implementation to WONTFIX.
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.