sslkey.html 编辑
- This page is part of the SSL Reference that we are migrating into the format described in the MDN Style Guide. If you are inclined to help with this migration, your help would be very much appreciated.
- Upgraded documentation may be found in the Current NSS Reference
Key Functions
Chapter 6 Key Functions
SECKEY_GetDefaultKeyDB
SECKEY_DestroyPrivateKey
SECKEY_GetDefaultKeyDB
Returns a handle to the default key database opened by NSS_Init
.
Syntax
#include <key.h> #include <keyt.h>
SECKEYKeyDBHandle *SECKEY_GetDefaultKeyDB(void);
Returns
The function returns a handle of type SECKEYKeyDBHandle
.
Description
NSS_Init
opens the certificate, key, and security module databases that you specify for use with NSS. SECKEYKeyDBHandle
returns a handle to the key database opened by NSS_Init
.
SECKEY_DestroyPrivateKey
Destroys a private key structure.
Syntax
#include <key.h> #include <keyt.h>
void SECKEY_DestroyPrivateKey(SECKEYPrivateKey *key);
Parameter
This function has the following parameter:
key |
Description
Certificate and key structures are shared objects. When an application makes a copy of a particular certificate or key structure that already exists in memory, SSL makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy. When you call CERT_DestroyCertificate
or SECKEY_DestroyPrivateKey
, the function decrements the reference count and, if the reference count reaches zero as a result, both frees the memory and sets all the bits to zero. The use of the word "destroy" in function names or in the description of a function implies reference counting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论