security/nss/lib/pki/symmkey.c

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/pki/symmkey.c	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,264 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef NSSPKI_H
     1.9 +#include "nsspki.h"
    1.10 +#endif /* NSSPKI_H */
    1.11 +
    1.12 +extern const NSSError NSS_ERROR_NOT_FOUND;
    1.13 +
    1.14 +NSS_IMPLEMENT PRStatus
    1.15 +NSSSymmetricKey_Destroy (
    1.16 +  NSSSymmetricKey *mk
    1.17 +)
    1.18 +{
    1.19 +    nss_SetError(NSS_ERROR_NOT_FOUND);
    1.20 +    return PR_FAILURE;
    1.21 +}
    1.22 +
    1.23 +NSS_IMPLEMENT PRStatus
    1.24 +NSSSymmetricKey_DeleteStoredObject (
    1.25 +  NSSSymmetricKey *mk,
    1.26 +  NSSCallback *uhh
    1.27 +)
    1.28 +{
    1.29 +    nss_SetError(NSS_ERROR_NOT_FOUND);
    1.30 +    return PR_FAILURE;
    1.31 +}
    1.32 +
    1.33 +NSS_IMPLEMENT PRUint32
    1.34 +NSSSymmetricKey_GetKeyLength (
    1.35 +  NSSSymmetricKey *mk
    1.36 +)
    1.37 +{
    1.38 +    nss_SetError(NSS_ERROR_NOT_FOUND);
    1.39 +    return -1;
    1.40 +}
    1.41 +
    1.42 +NSS_IMPLEMENT PRUint32
    1.43 +NSSSymmetricKey_GetKeyStrength (
    1.44 +  NSSSymmetricKey *mk
    1.45 +)
    1.46 +{
    1.47 +    nss_SetError(NSS_ERROR_NOT_FOUND);
    1.48 +    return -1;
    1.49 +}
    1.50 +
    1.51 +NSS_IMPLEMENT PRStatus
    1.52 +NSSSymmetricKey_IsStillPresent (
    1.53 +  NSSSymmetricKey *mk
    1.54 +)
    1.55 +{
    1.56 +    nss_SetError(NSS_ERROR_NOT_FOUND);
    1.57 +    return PR_FAILURE;
    1.58 +}
    1.59 +
    1.60 +NSS_IMPLEMENT NSSTrustDomain *
    1.61 +NSSSymmetricKey_GetTrustDomain (
    1.62 +  NSSSymmetricKey *mk,
    1.63 +  PRStatus *statusOpt
    1.64 +)
    1.65 +{
    1.66 +    nss_SetError(NSS_ERROR_NOT_FOUND);
    1.67 +    return NULL;
    1.68 +}
    1.69 +
    1.70 +NSS_IMPLEMENT NSSToken *
    1.71 +NSSSymmetricKey_GetToken (
    1.72 +  NSSSymmetricKey *mk,
    1.73 +  PRStatus *statusOpt
    1.74 +)
    1.75 +{
    1.76 +    nss_SetError(NSS_ERROR_NOT_FOUND);
    1.77 +    return NULL;
    1.78 +}
    1.79 +
    1.80 +NSS_IMPLEMENT NSSSlot *
    1.81 +NSSSymmetricKey_GetSlot (
    1.82 +  NSSSymmetricKey *mk,
    1.83 +  PRStatus *statusOpt
    1.84 +)
    1.85 +{
    1.86 +    nss_SetError(NSS_ERROR_NOT_FOUND);
    1.87 +    return NULL;
    1.88 +}
    1.89 +
    1.90 +NSS_IMPLEMENT NSSModule *
    1.91 +NSSSymmetricKey_GetModule (
    1.92 +  NSSSymmetricKey *mk,
    1.93 +  PRStatus *statusOpt
    1.94 +)
    1.95 +{
    1.96 +    nss_SetError(NSS_ERROR_NOT_FOUND);
    1.97 +    return NULL;
    1.98 +}
    1.99 +
   1.100 +NSS_IMPLEMENT NSSItem *
   1.101 +NSSSymmetricKey_Encrypt (
   1.102 +  NSSSymmetricKey *mk,
   1.103 +  NSSAlgorithmAndParameters *apOpt,
   1.104 +  NSSItem *data,
   1.105 +  NSSCallback *uhh,
   1.106 +  NSSItem *rvOpt,
   1.107 +  NSSArena *arenaOpt
   1.108 +)
   1.109 +{
   1.110 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.111 +    return NULL;
   1.112 +}
   1.113 +
   1.114 +NSS_IMPLEMENT NSSItem *
   1.115 +NSSSymmetricKey_Decrypt (
   1.116 +  NSSSymmetricKey *mk,
   1.117 +  NSSAlgorithmAndParameters *apOpt,
   1.118 +  NSSItem *encryptedData,
   1.119 +  NSSCallback *uhh,
   1.120 +  NSSItem *rvOpt,
   1.121 +  NSSArena *arenaOpt
   1.122 +)
   1.123 +{
   1.124 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.125 +    return NULL;
   1.126 +}
   1.127 +
   1.128 +NSS_IMPLEMENT NSSItem *
   1.129 +NSSSymmetricKey_Sign (
   1.130 +  NSSSymmetricKey *mk,
   1.131 +  NSSAlgorithmAndParameters *apOpt,
   1.132 +  NSSItem *data,
   1.133 +  NSSCallback *uhh,
   1.134 +  NSSItem *rvOpt,
   1.135 +  NSSArena *arenaOpt
   1.136 +)
   1.137 +{
   1.138 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.139 +    return NULL;
   1.140 +}
   1.141 +
   1.142 +NSS_IMPLEMENT NSSItem *
   1.143 +NSSSymmetricKey_SignRecover (
   1.144 +  NSSSymmetricKey *mk,
   1.145 +  NSSAlgorithmAndParameters *apOpt,
   1.146 +  NSSItem *data,
   1.147 +  NSSCallback *uhh,
   1.148 +  NSSItem *rvOpt,
   1.149 +  NSSArena *arenaOpt
   1.150 +)
   1.151 +{
   1.152 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.153 +    return NULL;
   1.154 +}
   1.155 +
   1.156 +NSS_IMPLEMENT PRStatus
   1.157 +NSSSymmetricKey_Verify (
   1.158 +  NSSSymmetricKey *mk,
   1.159 +  NSSAlgorithmAndParameters *apOpt,
   1.160 +  NSSItem *data,
   1.161 +  NSSItem *signature,
   1.162 +  NSSCallback *uhh
   1.163 +)
   1.164 +{
   1.165 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.166 +    return PR_FAILURE;
   1.167 +}
   1.168 +
   1.169 +NSS_IMPLEMENT NSSItem *
   1.170 +NSSSymmetricKey_VerifyRecover (
   1.171 +  NSSSymmetricKey *mk,
   1.172 +  NSSAlgorithmAndParameters *apOpt,
   1.173 +  NSSItem *signature,
   1.174 +  NSSCallback *uhh,
   1.175 +  NSSItem *rvOpt,
   1.176 +  NSSArena *arenaOpt
   1.177 +)
   1.178 +{
   1.179 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.180 +    return NULL;
   1.181 +}
   1.182 +
   1.183 +NSS_IMPLEMENT NSSItem *
   1.184 +NSSSymmetricKey_WrapSymmetricKey (
   1.185 +  NSSSymmetricKey *wrappingKey,
   1.186 +  NSSAlgorithmAndParameters *apOpt,
   1.187 +  NSSSymmetricKey *keyToWrap,
   1.188 +  NSSCallback *uhh,
   1.189 +  NSSItem *rvOpt,
   1.190 +  NSSArena *arenaOpt
   1.191 +)
   1.192 +{
   1.193 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.194 +    return NULL;
   1.195 +}
   1.196 +
   1.197 +NSS_IMPLEMENT NSSItem *
   1.198 +NSSSymmetricKey_WrapPrivateKey (
   1.199 +  NSSSymmetricKey *wrappingKey,
   1.200 +  NSSAlgorithmAndParameters *apOpt,
   1.201 +  NSSPrivateKey *keyToWrap,
   1.202 +  NSSCallback *uhh,
   1.203 +  NSSItem *rvOpt,
   1.204 +  NSSArena *arenaOpt
   1.205 +)
   1.206 +{
   1.207 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.208 +    return NULL;
   1.209 +}
   1.210 +
   1.211 +NSS_IMPLEMENT NSSSymmetricKey *
   1.212 +NSSSymmetricKey_UnwrapSymmetricKey (
   1.213 +  NSSSymmetricKey *wrappingKey,
   1.214 +  NSSAlgorithmAndParameters *apOpt,
   1.215 +  NSSItem *wrappedKey,
   1.216 +  NSSOID *target,
   1.217 +  PRUint32 keySizeOpt,
   1.218 +  NSSOperations operations,
   1.219 +  NSSCallback *uhh
   1.220 +)
   1.221 +{
   1.222 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.223 +    return NULL;
   1.224 +}
   1.225 +
   1.226 +NSS_IMPLEMENT NSSPrivateKey *
   1.227 +NSSSymmetricKey_UnwrapPrivateKey (
   1.228 +  NSSSymmetricKey *wrappingKey,
   1.229 +  NSSAlgorithmAndParameters *apOpt,
   1.230 +  NSSItem *wrappedKey,
   1.231 +  NSSUTF8 *labelOpt,
   1.232 +  NSSItem *keyIDOpt,
   1.233 +  PRBool persistant,
   1.234 +  PRBool sensitive,
   1.235 +  NSSToken *destinationOpt,
   1.236 +  NSSCallback *uhh
   1.237 +)
   1.238 +{
   1.239 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.240 +    return NULL;
   1.241 +}
   1.242 +
   1.243 +NSS_IMPLEMENT NSSSymmetricKey *
   1.244 +NSSSymmetricKey_DeriveSymmetricKey (
   1.245 +  NSSSymmetricKey *originalKey,
   1.246 +  NSSAlgorithmAndParameters *apOpt,
   1.247 +  NSSOID *target,
   1.248 +  PRUint32 keySizeOpt,
   1.249 +  NSSOperations operations,
   1.250 +  NSSCallback *uhh
   1.251 +)
   1.252 +{
   1.253 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.254 +    return NULL;
   1.255 +}
   1.256 +
   1.257 +NSS_IMPLEMENT NSSCryptoContext *
   1.258 +NSSSymmetricKey_CreateCryptoContext (
   1.259 +  NSSSymmetricKey *mk,
   1.260 +  NSSAlgorithmAndParameters *apOpt,
   1.261 +  NSSCallback *uhh
   1.262 +)
   1.263 +{
   1.264 +    nss_SetError(NSS_ERROR_NOT_FOUND);
   1.265 +    return NULL;
   1.266 +}
   1.267 +

mercurial