Closed
Bug 114469
Opened 24 years ago
Closed 24 years ago
PK11_ImportDERPrivateKeyInfo should return a SECKEYPrivateKey*
Categories
(NSS :: Libraries, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
3.4
People
(Reporter: jamie-bugzilla, Assigned: rrelyea)
References
Details
Attachments
(2 files)
5.47 KB,
patch
|
Details | Diff | Splinter Review | |
5.47 KB,
patch
|
Details | Diff | Splinter Review |
If I call PK11_ImportDERPrivateKeyInfo, I should get back a pointer to the key I just created so I don't have to go hunting for it. This is especially true for JCA, where we will always want to get a pointer to a key after we import it.
Reporter | ||
Comment 1•24 years ago
|
||
Add one private and two public functions to NSS.
PK11_ImportAndReturnPrivateKey(private)
PK11_ImportPrivateKeyInfoAndReturnKey(public)
PK11_ImportDERPrivateKeyInfoAndReturnKey(public)
These functions supplement three existing functions whose names are the same as
above without "AndReturnKey". The existing functions have been reimplemented to
call the new functions.
The new functions simply take an extra argument, a SECKEYPrivateKey**. If not
NULL, it will be pointed at the new private key that was imported. The old
functions got as far as recovering the PKCS #11 object ID of the new key, then
simply threw it away. The new functions go the extra step of wrapping the
object ID and slot in a SECKEYPrivateKey*.
Reporter | ||
Comment 2•24 years ago
|
||
Add one private and two public functions to NSS.
PK11_ImportAndReturnPrivateKey(private)
PK11_ImportPrivateKeyInfoAndReturnKey(public)
PK11_ImportDERPrivateKeyInfoAndReturnKey(public)
These functions supplement three existing functions whose names are the same as
above without "AndReturnKey". The existing functions have been reimplemented to
call the new functions.
The new functions simply take an extra argument, a SECKEYPrivateKey**. If not
NULL, it will be pointed at the new private key that was imported. The old
functions got as far as recovering the PKCS #11 object ID of the new key, then
simply threw it away. The new functions go the extra step of wrapping the
object ID and slot in a SECKEYPrivateKey*.
Assignee | ||
Comment 3•24 years ago
|
||
looks OK Jamie, though I would have liked to see the public function return the
key as a parameter rather than return it as a parameter.
The implementation is fine. (it's okay for the internal function to take the
parameter so we don't allocate a new key when we don't need it).
bob
Updated•24 years ago
|
Priority: -- → P1
Reporter | ||
Comment 4•24 years ago
|
||
Committed to trunk.
/cvsroot/mozilla/security/nss/lib/nss/nss.def,v <-- nss.def
new revision: 1.44; previous revision: 1.43
done
Checking in pk11wrap/pk11func.h;
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11func.h,v <-- pk11func.h
new revision: 1.21; previous revision: 1.20
done
Checking in pk11wrap/pk11pk12.c;
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11pk12.c,v <-- pk11pk12.c
new revision: 1.3; previous revision: 1.2
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.
Description
•