Closed Bug 130968 Opened 22 years ago Closed 21 years ago

SEC_TraversePermCerts is referenced but not defined

Categories

(NSS :: Libraries, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Assigned: rrelyea)

Details

Attachments

(2 files, 1 obsolete file)

The function SEC_TraversePermCerts is referenced by two
files (lib/jar/jarjart.c and cmd/lib/seccnames.c) but
not defined.

I don't know why we are not getting unresolved symbol
linker errors.  I found out about this problem because
the compiler warns about implicit declaration of
function SEC_TraversePermCerts (it's not declared in
any header file).

Is this a serious problem?
No, I suspect we aren't getting an error because the code that references
SEC_TraversePermCerts is dead code.

No external apps include libjar anymore (only a couple of our internal ones).

bob
Changed the QA contact to Bishakha.
QA Contact: sonja.mirtitsch → bishakhabanerjee
Setting target to 3.5 may be pushed off since it's not critical
Target Milestone: --- → 3.5
Moved to NSS 3.6, priority P3, severity trivial.

Bob, I guess the fix is not to implement SEC_TraversePermCerts
but rather to remove the references to this symbol, right?
Severity: normal → trivial
Priority: -- → P3
Target Milestone: 3.5 → 3.6
yes, the fix would be to replace SEC_TraversePermCerts with PK11_ListCerts.
Target Milestone: 3.6 → 3.7
Moved to target milestone 3.8 because the original
NSS 3.7 release has been renamed 3.8.
Target Milestone: 3.7 → 3.8
Attachment #115951 - Flags: superreview?(jpierre)
Attachment #115951 - Flags: review?(wtc)
Comment on attachment 115951 [details] [diff] [review]
Remove Traverse call from libjar.

In jarjart.c,

>+    certs = PK11_ListCerts(PK11CertListUnique, NULL/* pwarg*/);
>+    if (certs)
>+      {
>+	for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node,certs);
>+				node = CERT_LIST_NEXT(node))
>+           {
>+	    jar_list_cert_callback(node->cert, NULL, (void *)&ugly_list);
>+	   }
>+	CERT_DestroyCertList(certs);
>+       }
>+     else
>+       {
>+	status = SECFailure;
>+       }

The new code will never set 'status' to SECSuccess.  It is
also ignoring the return value of jar_list_cert_callback.
If 'certs' is not NULL, I think 'status' should either be
set to SECSuccess or based on the return value of
jar_list_cert_callback.
Attachment #115951 - Flags: review?(wtc) → review-
It should return SECSuccess if it finds some certs.
Ignoring the return code from the callback function emulates the same behavior
as the original Traverse function.
Attachment #115951 - Attachment is obsolete: true
Comment on attachment 116243 [details] [diff] [review]
Incorporate wtc's comments...

r=wtc.	cmd/lib/seccnames.c also needs to be fixed.
Attachment #116243 - Flags: review+
Comment on attachment 116323 [details] [diff] [review]
Remove depricated '.c' file

r=wtc.
Attachment #116323 - Flags: review+
These patches are all checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Attachment #115951 - Flags: superreview?(jpierre)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: