| Index: nss/lib/cryptohi/seckey.c
|
| ===================================================================
|
| --- nss/lib/cryptohi/seckey.c (revision 233722)
|
| +++ nss/lib/cryptohi/seckey.c (working copy)
|
| @@ -444,8 +444,9 @@
|
| * the normal standard format. Store the decoded parameters in
|
| * a V3 certificate data structure. */
|
|
|
| -SECStatus
|
| -SECKEY_DSADecodePQG(PLArenaPool *arena, SECKEYPublicKey *pubk, SECItem *params) {
|
| +static SECStatus
|
| +seckey_DSADecodePQG(PLArenaPool *arena, SECKEYPublicKey *pubk,
|
| + const SECItem *params) {
|
| SECStatus rv;
|
| SECItem newparams;
|
|
|
| @@ -539,13 +540,13 @@
|
|
|
| /* Function used to determine what kind of cert we are dealing with. */
|
| KeyType
|
| -CERT_GetCertKeyType (CERTSubjectPublicKeyInfo *spki)
|
| +CERT_GetCertKeyType (const CERTSubjectPublicKeyInfo *spki)
|
| {
|
| return seckey_GetKeyType(SECOID_GetAlgorithmTag(&spki->algorithm));
|
| }
|
|
|
| static SECKEYPublicKey *
|
| -seckey_ExtractPublicKey(CERTSubjectPublicKeyInfo *spki)
|
| +seckey_ExtractPublicKey(const CERTSubjectPublicKeyInfo *spki)
|
| {
|
| SECKEYPublicKey *pubk;
|
| SECItem os, newOs, newParms;
|
| @@ -594,7 +595,7 @@
|
| rv = SEC_QuickDERDecodeItem(arena, pubk, SECKEY_DSAPublicKeyTemplate, &newOs);
|
| if (rv != SECSuccess) break;
|
|
|
| - rv = SECKEY_DSADecodePQG(arena, pubk,
|
| + rv = seckey_DSADecodePQG(arena, pubk,
|
| &spki->algorithm.parameters);
|
|
|
| if (rv == SECSuccess) return pubk;
|
| @@ -644,7 +645,7 @@
|
|
|
| /* required for JSS */
|
| SECKEYPublicKey *
|
| -SECKEY_ExtractPublicKey(CERTSubjectPublicKeyInfo *spki)
|
| +SECKEY_ExtractPublicKey(const CERTSubjectPublicKeyInfo *spki)
|
| {
|
| return seckey_ExtractPublicKey(spki);
|
| }
|
| @@ -1344,7 +1345,7 @@
|
| * similiar to CERT_ExtractPublicKey for other key times.
|
| */
|
| SECKEYPublicKey *
|
| -SECKEY_DecodeDERPublicKey(SECItem *pubkder)
|
| +SECKEY_DecodeDERPublicKey(const SECItem *pubkder)
|
| {
|
| PLArenaPool *arena;
|
| SECKEYPublicKey *pubk;
|
| @@ -1385,7 +1386,7 @@
|
| * Decode a base64 ascii encoded DER encoded public key.
|
| */
|
| SECKEYPublicKey *
|
| -SECKEY_ConvertAndDecodePublicKey(char *pubkstr)
|
| +SECKEY_ConvertAndDecodePublicKey(const char *pubkstr)
|
| {
|
| SECKEYPublicKey *pubk;
|
| SECStatus rv;
|
| @@ -1425,7 +1426,7 @@
|
|
|
|
|
| CERTSubjectPublicKeyInfo *
|
| -SECKEY_DecodeDERSubjectPublicKeyInfo(SECItem *spkider)
|
| +SECKEY_DecodeDERSubjectPublicKeyInfo(const SECItem *spkider)
|
| {
|
| PLArenaPool *arena;
|
| CERTSubjectPublicKeyInfo *spki;
|
| @@ -1464,7 +1465,7 @@
|
| * Decode a base64 ascii encoded DER encoded subject public key info.
|
| */
|
| CERTSubjectPublicKeyInfo *
|
| -SECKEY_ConvertAndDecodeSubjectPublicKeyInfo(char *spkistr)
|
| +SECKEY_ConvertAndDecodeSubjectPublicKeyInfo(const char *spkistr)
|
| {
|
| CERTSubjectPublicKeyInfo *spki;
|
| SECStatus rv;
|
| @@ -1647,7 +1648,7 @@
|
| SECStatus
|
| SECKEY_CopyPrivateKeyInfo(PLArenaPool *poolp,
|
| SECKEYPrivateKeyInfo *to,
|
| - SECKEYPrivateKeyInfo *from)
|
| + const SECKEYPrivateKeyInfo *from)
|
| {
|
| SECStatus rv = SECFailure;
|
|
|
| @@ -1671,7 +1672,7 @@
|
| SECStatus
|
| SECKEY_CopyEncryptedPrivateKeyInfo(PLArenaPool *poolp,
|
| SECKEYEncryptedPrivateKeyInfo *to,
|
| - SECKEYEncryptedPrivateKeyInfo *from)
|
| + const SECKEYEncryptedPrivateKeyInfo *from)
|
| {
|
| SECStatus rv = SECFailure;
|
|
|
| @@ -1689,19 +1690,19 @@
|
| }
|
|
|
| KeyType
|
| -SECKEY_GetPrivateKeyType(SECKEYPrivateKey *privKey)
|
| +SECKEY_GetPrivateKeyType(const SECKEYPrivateKey *privKey)
|
| {
|
| return privKey->keyType;
|
| }
|
|
|
| KeyType
|
| -SECKEY_GetPublicKeyType(SECKEYPublicKey *pubKey)
|
| +SECKEY_GetPublicKeyType(const SECKEYPublicKey *pubKey)
|
| {
|
| return pubKey->keyType;
|
| }
|
|
|
| SECKEYPublicKey*
|
| -SECKEY_ImportDERPublicKey(SECItem *derKey, CK_KEY_TYPE type)
|
| +SECKEY_ImportDERPublicKey(const SECItem *derKey, CK_KEY_TYPE type)
|
| {
|
| SECKEYPublicKey *pubk = NULL;
|
| SECStatus rv = SECFailure;
|
|
|