Closed Bug 1271930 Opened 8 years ago Closed 8 years ago

Refactor copying of server certificates

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mt, Assigned: mt)

Details

Attachments

(2 files)

There's a few bits of code in sslsock.c that copy server certs from one socket to another.  That duplicates a lot of code.  Since I only recently added the certificate handling stuff, I figure that we can do better for that at a minimum.  It has the consequence of making things a bit tidier at the same time by reducing cleanup overhead.
Assignee: nobody → martin.thomson
Attachment #8751211 - Flags: review?(ttaubert)
I just realized how hard it is to review this.  Here's a patch with -w.
Comment on attachment 8751211 [details] [diff] [review]
bug1271930-1.patch

Review of attachment 8751211 [details] [diff] [review]:
-----------------------------------------------------------------

Great cleanup, didn't find anything wrong with it. And thanks for the -w patch. Sorry it took me so long.

::: lib/ssl/sslcert.c
@@ +80,5 @@
> +
> +    if (oc->serverKeyPair) {
> +        sc->serverKeyPair =  ssl_GetKeyPairRef(oc->serverKeyPair);
> +    if (!sc->serverKeyPair)
> +        goto loser;

Nit: the indentation of the two lines above is a little off. And there's an extra white space in the line above those two.
Attachment #8751211 - Flags: review?(ttaubert) → review+
https://hg.mozilla.org/projects/nss/rev/eddc89f0b033
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.25
Clang-format is letting me down.  https://hg.mozilla.org/projects/nss/rev/4df730fb1062
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: