Closed Bug 112884 Opened 24 years ago Closed 24 years ago

How to extract the PQG parameters from a DSA private key?

Categories

(NSS :: Libraries, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jamie-bugzilla, Assigned: rrelyea)

References

Details

Attachments

(1 file)

Java's DSAPrivateKey type has methods allowing you to extract the PQG parameters. What NSS method can I call to get the PQG parameters from a DSA private key?
Blocks: 112882
Target Milestone: --- → 3.4
Priority: -- → P1
Comment on attachment 67748 [details] [diff] [review] Function to read PQG's from a DSA key. Hi Bob, Just a minor problem in one of the error paths in the new function. >+SECKEYPQGParams * >+PK11_GetPQGParamsFromPrivateKey(SECKEYPrivateKey *privKey) >+{ [...] >+ >+ arena = PORT_NewArena(2048); >+ if (arena == NULL) { >+ goto loser; >+ } We need to replace "goto loser" by "return NULL". If we pass arena=NULL to PORT_FreeArena(), that function will crash.
Attachment #67748 - Flags: needs-work+
Oops, actually the intention was to check for NULL before freeing: if (arena) { PORT_FreeArena(arena,FALSE); } bob
Reopen if function does not work.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: