libpkix: ifdef code that uses user object types

RESOLVED FIXED in 3.12

Status

NSS
Libraries
P2
enhancement
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Alexei Volkov, Assigned: Alexei Volkov)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: PKIX)

Attachments

(1 attachment, 2 obsolete attachments)

70.36 KB, patch
Nelson Bolyard (seldom reads bugmail)
: review+
Details | Diff | Splinter Review
(Assignee)

Description

10 years ago
libpkix associates unique number(object type) with each structures defined by the library. There are two ways for creation of a new types: one - by adding new element into PKIX_TYPENUM enum(defined in pkixt.h); two - create new, so called, "user type" by calling PKIX_PL_Object_RegisterType.

Since current implementation does not use any "user types" functionality we should ifdef all code related to "user types".
(Assignee)

Updated

10 years ago
Priority: -- → P2
Whiteboard: PKIX
(Assignee)

Comment 1

10 years ago
Created attachment 288761 [details] [diff] [review]
Patch v1

This has been attached to the bug 391457 and reviewed by Nelson.
Attachment #288761 - Flags: review-
(Assignee)

Comment 2

10 years ago
Created attachment 288762 [details] [diff] [review]
Patch v2
Attachment #288762 - Flags: review?
(Assignee)

Comment 3

10 years ago
Created attachment 288763 [details] [diff] [review]
Patch v2

modified according to review comments.
Attachment #288761 - Attachment is obsolete: true
Attachment #288763 - Flags: review?(nelson)
(Assignee)

Updated

10 years ago
Attachment #288762 - Attachment is obsolete: true
Attachment #288762 - Flags: review?
(Assignee)

Updated

10 years ago
Duplicate of this bug: 403538
Comment on attachment 288763 [details] [diff] [review]
Patch v2

This patch creates many new places where we see code sequences like this:
 ...
 goto cleanup;
} else {
 ...
}
cleanup:

In those sequences, the goto cleanup is unnecessary.  But let's get this checked in and we can clean that up later.

While reviewing this patch, I noticed more structure declarations in header files, for structures that should be completely private, known only inside the related .c file.  We should fix all those to mitigate the temptation to access internals of other objects' private internals.  But we can do that in a later patch for another bug.
Attachment #288763 - Flags: review?(nelson) → review+
Alexei, one more question:
Have you built this code (with the patch applied) both with and without 
the feature test macro PKIX_USER_OBJECT_TYPE defined?
Do you know for certain that this code still builds when that macro is 
defined?  
If it does not, then before we can close this bug we need to fix that.
Version: 3.12 → trunk
(Assignee)

Comment 7

10 years ago
Tree builds with and without macro PKIX_USER_OBJECT_TYPE been defined.
(Assignee)

Comment 8

10 years ago
Patch v2 has been integrated.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.