summaryrefslogtreecommitdiff
path: root/nss/lib/softoken/legacydb/lowkeyi.h
diff options
context:
space:
mode:
Diffstat (limited to 'nss/lib/softoken/legacydb/lowkeyi.h')
-rw-r--r--nss/lib/softoken/legacydb/lowkeyi.h85
1 files changed, 42 insertions, 43 deletions
diff --git a/nss/lib/softoken/legacydb/lowkeyi.h b/nss/lib/softoken/legacydb/lowkeyi.h
index 6739888..5136b56 100644
--- a/nss/lib/softoken/legacydb/lowkeyi.h
+++ b/nss/lib/softoken/legacydb/lowkeyi.h
@@ -10,7 +10,7 @@
#include "secoidt.h"
#include "pcertt.h"
#include "lowkeyti.h"
-#include "sdb.h"
+#include "sdb.h"
SEC_BEGIN_PROTOS
@@ -31,16 +31,16 @@ extern void lg_prepare_low_ec_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
extern void lg_prepare_low_ecparams_for_asn1(ECParams *params);
#endif /* NSS_DISABLE_ECC */
-typedef char * (* NSSLOWKEYDBNameFunc)(void *arg, int dbVersion);
-
+typedef char *(*NSSLOWKEYDBNameFunc)(void *arg, int dbVersion);
+
/*
** Open a key database.
*/
extern NSSLOWKEYDBHandle *nsslowkey_OpenKeyDB(PRBool readOnly,
- const char *domain,
- const char *prefix,
- NSSLOWKEYDBNameFunc namecb,
- void *cbarg);
+ const char *domain,
+ const char *prefix,
+ NSSLOWKEYDBNameFunc namecb,
+ void *cbarg);
/*
** Close the specified key database.
@@ -55,55 +55,54 @@ extern int nsslowkey_GetKeyDBVersion(NSSLOWKEYDBHandle *handle);
/*
** Delete a key from the database
*/
-extern SECStatus nsslowkey_DeleteKey(NSSLOWKEYDBHandle *handle,
- const SECItem *pubkey);
+extern SECStatus nsslowkey_DeleteKey(NSSLOWKEYDBHandle *handle,
+ const SECItem *pubkey);
/*
** Store a key in the database, indexed by its public key modulus.
-** "pk" is the private key to store
-** "f" is the callback function for getting the password
-** "arg" is the argument for the callback
+** "pk" is the private key to store
+** "f" is the callback function for getting the password
+** "arg" is the argument for the callback
*/
-extern SECStatus nsslowkey_StoreKeyByPublicKey(NSSLOWKEYDBHandle *handle,
- NSSLOWKEYPrivateKey *pk,
- SECItem *pubKeyData,
- char *nickname,
- SDB *sdb);
+extern SECStatus nsslowkey_StoreKeyByPublicKey(NSSLOWKEYDBHandle *handle,
+ NSSLOWKEYPrivateKey *pk,
+ SECItem *pubKeyData,
+ char *nickname,
+ SDB *sdb);
/* does the key for this cert exist in the database filed by modulus */
extern PRBool nsslowkey_KeyForCertExists(NSSLOWKEYDBHandle *handle,
- NSSLOWCERTCertificate *cert);
+ NSSLOWCERTCertificate *cert);
/* does a key with this ID already exist? */
extern PRBool nsslowkey_KeyForIDExists(NSSLOWKEYDBHandle *handle, SECItem *id);
/*
** Destroy a private key object.
-** "key" the object
-** "freeit" if PR_TRUE then free the object as well as its sub-objects
+** "key" the object
+** "freeit" if PR_TRUE then free the object as well as its sub-objects
*/
extern void lg_nsslowkey_DestroyPrivateKey(NSSLOWKEYPrivateKey *key);
/*
** Destroy a public key object.
-** "key" the object
-** "freeit" if PR_TRUE then free the object as well as its sub-objects
+** "key" the object
+** "freeit" if PR_TRUE then free the object as well as its sub-objects
*/
extern void lg_nsslowkey_DestroyPublicKey(NSSLOWKEYPublicKey *key);
-
/*
** Convert a low private key "privateKey" into a public low key
*/
-extern NSSLOWKEYPublicKey
- *lg_nsslowkey_ConvertToPublicKey(NSSLOWKEYPrivateKey *privateKey);
-
+extern NSSLOWKEYPublicKey
+ *
+ lg_nsslowkey_ConvertToPublicKey(NSSLOWKEYPrivateKey *privateKey);
SECStatus
nsslowkey_UpdateNickname(NSSLOWKEYDBHandle *handle,
- NSSLOWKEYPrivateKey *privkey,
- SECItem *pubKeyData,
- char *nickname,
- SDB *sdb);
+ NSSLOWKEYPrivateKey *privkey,
+ SECItem *pubKeyData,
+ char *nickname,
+ SDB *sdb);
/* Store key by modulus and specify an encryption algorithm to use.
* handle is the pointer to the key database,
@@ -113,27 +112,27 @@ nsslowkey_UpdateNickname(NSSLOWKEYDBHandle *handle,
* algorithm is the algorithm which the privKey is to be stored.
* A return of anything but SECSuccess indicates failure.
*/
-extern SECStatus
-nsslowkey_StoreKeyByPublicKeyAlg(NSSLOWKEYDBHandle *handle,
- NSSLOWKEYPrivateKey *privkey,
- SECItem *pubKeyData,
- char *nickname,
- SDB *sdb,
- PRBool update);
+extern SECStatus
+nsslowkey_StoreKeyByPublicKeyAlg(NSSLOWKEYDBHandle *handle,
+ NSSLOWKEYPrivateKey *privkey,
+ SECItem *pubKeyData,
+ char *nickname,
+ SDB *sdb,
+ PRBool update);
/* Find key by modulus. This function is the inverse of store key
- * by modulus. An attempt to locate the key with "modulus" is
+ * by modulus. An attempt to locate the key with "modulus" is
* performed. If the key is found, the private key is returned,
* else NULL is returned.
* modulus is the modulus to locate
*/
extern NSSLOWKEYPrivateKey *
-nsslowkey_FindKeyByPublicKey(NSSLOWKEYDBHandle *handle, SECItem *modulus,
- SDB *sdb);
+nsslowkey_FindKeyByPublicKey(NSSLOWKEYDBHandle *handle, SECItem *modulus,
+ SDB *sdb);
extern char *
nsslowkey_FindKeyNicknameByPublicKey(NSSLOWKEYDBHandle *handle,
- SECItem *modulus, SDB *sdb);
+ SECItem *modulus, SDB *sdb);
#ifndef NSS_DISABLE_ECC
/*
@@ -141,11 +140,11 @@ nsslowkey_FindKeyNicknameByPublicKey(NSSLOWKEYDBHandle *handle,
* oid and DER data.
*/
SECStatus LGEC_FillParams(PLArenaPool *arena, const SECItem *encodedParams,
- ECParams *params);
+ ECParams *params);
/* Copy all of the fields from srcParams into dstParams */
SECStatus LGEC_CopyParams(PLArenaPool *arena, ECParams *dstParams,
- const ECParams *srcParams);
+ const ECParams *srcParams);
#endif
SEC_END_PROTOS