Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 397825 - libpkix: ifdef code that uses user object types
: libpkix: ifdef code that uses user object types
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: trunk
: All All
: P2 enhancement (vote)
: 3.12
Assigned To: Alexei Volkov
: 403538 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2007-09-27 15:32 PDT by Alexei Volkov
Modified: 2007-12-10 15:53 PST (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Patch v1 (64.13 KB, patch)
2007-11-14 15:27 PST, Alexei Volkov
alvolkov.bgs: review-
Details | Diff | Splinter Review
Patch v2 (70.36 KB, patch)
2007-11-14 15:28 PST, Alexei Volkov
no flags Details | Diff | Splinter Review
Patch v2 (70.36 KB, patch)
2007-11-14 15:28 PST, Alexei Volkov
nelson: review+
Details | Diff | Splinter Review

Description Alexei Volkov 2007-09-27 15:32:07 PDT
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".
Comment 1 Alexei Volkov 2007-11-14 15:27:50 PST
Created attachment 288761 [details] [diff] [review]
Patch v1

This has been attached to the bug 391457 and reviewed by Nelson.
Comment 2 Alexei Volkov 2007-11-14 15:28:27 PST
Created attachment 288762 [details] [diff] [review]
Patch v2
Comment 3 Alexei Volkov 2007-11-14 15:28:59 PST
Created attachment 288763 [details] [diff] [review]
Patch v2

modified according to review comments.
Comment 4 Alexei Volkov 2007-11-14 15:31:56 PST
*** Bug 403538 has been marked as a duplicate of this bug. ***
Comment 5 Nelson Bolyard (seldom reads bugmail) 2007-11-14 21:51:33 PST
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 {

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.
Comment 6 Nelson Bolyard (seldom reads bugmail) 2007-11-14 21:54:23 PST
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 
If it does not, then before we can close this bug we need to fix that.
Comment 7 Alexei Volkov 2007-12-10 15:47:00 PST
Tree builds with and without macro PKIX_USER_OBJECT_TYPE been defined.
Comment 8 Alexei Volkov 2007-12-10 15:53:37 PST
Patch v2 has been integrated.

Note You need to log in before you can comment on or make changes to this bug.