Back to index

lightning-sunbird  0.9+nobinonly
symmkey.c
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the Netscape security libraries.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corporation.
00018  * Portions created by the Initial Developer are Copyright (C) 1994-2000
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 #ifdef DEBUG
00038 static const char CVS_ID[] = "@(#) $RCSfile: symmkey.c,v $ $Revision: 1.6 $ $Date: 2005/01/20 02:25:49 $";
00039 #endif /* DEBUG */
00040 
00041 #ifndef NSSPKI_H
00042 #include "nsspki.h"
00043 #endif /* NSSPKI_H */
00044 
00045 extern const NSSError NSS_ERROR_NOT_FOUND;
00046 
00047 NSS_IMPLEMENT PRStatus
00048 NSSSymmetricKey_Destroy (
00049   NSSSymmetricKey *mk
00050 )
00051 {
00052     nss_SetError(NSS_ERROR_NOT_FOUND);
00053     return PR_FAILURE;
00054 }
00055 
00056 NSS_IMPLEMENT PRStatus
00057 NSSSymmetricKey_DeleteStoredObject (
00058   NSSSymmetricKey *mk,
00059   NSSCallback *uhh
00060 )
00061 {
00062     nss_SetError(NSS_ERROR_NOT_FOUND);
00063     return PR_FAILURE;
00064 }
00065 
00066 NSS_IMPLEMENT PRUint32
00067 NSSSymmetricKey_GetKeyLength (
00068   NSSSymmetricKey *mk
00069 )
00070 {
00071     nss_SetError(NSS_ERROR_NOT_FOUND);
00072     return -1;
00073 }
00074 
00075 NSS_IMPLEMENT PRUint32
00076 NSSSymmetricKey_GetKeyStrength (
00077   NSSSymmetricKey *mk
00078 )
00079 {
00080     nss_SetError(NSS_ERROR_NOT_FOUND);
00081     return -1;
00082 }
00083 
00084 NSS_IMPLEMENT PRStatus
00085 NSSSymmetricKey_IsStillPresent (
00086   NSSSymmetricKey *mk
00087 )
00088 {
00089     nss_SetError(NSS_ERROR_NOT_FOUND);
00090     return PR_FAILURE;
00091 }
00092 
00093 NSS_IMPLEMENT NSSTrustDomain *
00094 NSSSymmetricKey_GetTrustDomain (
00095   NSSSymmetricKey *mk,
00096   PRStatus *statusOpt
00097 )
00098 {
00099     nss_SetError(NSS_ERROR_NOT_FOUND);
00100     return NULL;
00101 }
00102 
00103 NSS_IMPLEMENT NSSToken *
00104 NSSSymmetricKey_GetToken (
00105   NSSSymmetricKey *mk,
00106   PRStatus *statusOpt
00107 )
00108 {
00109     nss_SetError(NSS_ERROR_NOT_FOUND);
00110     return NULL;
00111 }
00112 
00113 NSS_IMPLEMENT NSSSlot *
00114 NSSSymmetricKey_GetSlot (
00115   NSSSymmetricKey *mk,
00116   PRStatus *statusOpt
00117 )
00118 {
00119     nss_SetError(NSS_ERROR_NOT_FOUND);
00120     return NULL;
00121 }
00122 
00123 NSS_IMPLEMENT NSSModule *
00124 NSSSymmetricKey_GetModule (
00125   NSSSymmetricKey *mk,
00126   PRStatus *statusOpt
00127 )
00128 {
00129     nss_SetError(NSS_ERROR_NOT_FOUND);
00130     return NULL;
00131 }
00132 
00133 NSS_IMPLEMENT NSSItem *
00134 NSSSymmetricKey_Encrypt (
00135   NSSSymmetricKey *mk,
00136   NSSAlgorithmAndParameters *apOpt,
00137   NSSItem *data,
00138   NSSCallback *uhh,
00139   NSSItem *rvOpt,
00140   NSSArena *arenaOpt
00141 )
00142 {
00143     nss_SetError(NSS_ERROR_NOT_FOUND);
00144     return NULL;
00145 }
00146 
00147 NSS_IMPLEMENT NSSItem *
00148 NSSSymmetricKey_Decrypt (
00149   NSSSymmetricKey *mk,
00150   NSSAlgorithmAndParameters *apOpt,
00151   NSSItem *encryptedData,
00152   NSSCallback *uhh,
00153   NSSItem *rvOpt,
00154   NSSArena *arenaOpt
00155 )
00156 {
00157     nss_SetError(NSS_ERROR_NOT_FOUND);
00158     return NULL;
00159 }
00160 
00161 NSS_IMPLEMENT NSSItem *
00162 NSSSymmetricKey_Sign (
00163   NSSSymmetricKey *mk,
00164   NSSAlgorithmAndParameters *apOpt,
00165   NSSItem *data,
00166   NSSCallback *uhh,
00167   NSSItem *rvOpt,
00168   NSSArena *arenaOpt
00169 )
00170 {
00171     nss_SetError(NSS_ERROR_NOT_FOUND);
00172     return NULL;
00173 }
00174 
00175 NSS_IMPLEMENT NSSItem *
00176 NSSSymmetricKey_SignRecover (
00177   NSSSymmetricKey *mk,
00178   NSSAlgorithmAndParameters *apOpt,
00179   NSSItem *data,
00180   NSSCallback *uhh,
00181   NSSItem *rvOpt,
00182   NSSArena *arenaOpt
00183 )
00184 {
00185     nss_SetError(NSS_ERROR_NOT_FOUND);
00186     return NULL;
00187 }
00188 
00189 NSS_IMPLEMENT PRStatus
00190 NSSSymmetricKey_Verify (
00191   NSSSymmetricKey *mk,
00192   NSSAlgorithmAndParameters *apOpt,
00193   NSSItem *data,
00194   NSSItem *signature,
00195   NSSCallback *uhh
00196 )
00197 {
00198     nss_SetError(NSS_ERROR_NOT_FOUND);
00199     return PR_FAILURE;
00200 }
00201 
00202 NSS_IMPLEMENT NSSItem *
00203 NSSSymmetricKey_VerifyRecover (
00204   NSSSymmetricKey *mk,
00205   NSSAlgorithmAndParameters *apOpt,
00206   NSSItem *signature,
00207   NSSCallback *uhh,
00208   NSSItem *rvOpt,
00209   NSSArena *arenaOpt
00210 )
00211 {
00212     nss_SetError(NSS_ERROR_NOT_FOUND);
00213     return NULL;
00214 }
00215 
00216 NSS_IMPLEMENT NSSItem *
00217 NSSSymmetricKey_WrapSymmetricKey (
00218   NSSSymmetricKey *wrappingKey,
00219   NSSAlgorithmAndParameters *apOpt,
00220   NSSSymmetricKey *keyToWrap,
00221   NSSCallback *uhh,
00222   NSSItem *rvOpt,
00223   NSSArena *arenaOpt
00224 )
00225 {
00226     nss_SetError(NSS_ERROR_NOT_FOUND);
00227     return NULL;
00228 }
00229 
00230 NSS_IMPLEMENT NSSItem *
00231 NSSSymmetricKey_WrapPrivateKey (
00232   NSSSymmetricKey *wrappingKey,
00233   NSSAlgorithmAndParameters *apOpt,
00234   NSSPrivateKey *keyToWrap,
00235   NSSCallback *uhh,
00236   NSSItem *rvOpt,
00237   NSSArena *arenaOpt
00238 )
00239 {
00240     nss_SetError(NSS_ERROR_NOT_FOUND);
00241     return NULL;
00242 }
00243 
00244 NSS_IMPLEMENT NSSSymmetricKey *
00245 NSSSymmetricKey_UnwrapSymmetricKey (
00246   NSSSymmetricKey *wrappingKey,
00247   NSSAlgorithmAndParameters *apOpt,
00248   NSSItem *wrappedKey,
00249   NSSOID *target,
00250   PRUint32 keySizeOpt,
00251   NSSOperations operations,
00252   NSSCallback *uhh
00253 )
00254 {
00255     nss_SetError(NSS_ERROR_NOT_FOUND);
00256     return NULL;
00257 }
00258 
00259 NSS_IMPLEMENT NSSPrivateKey *
00260 NSSSymmetricKey_UnwrapPrivateKey (
00261   NSSSymmetricKey *wrappingKey,
00262   NSSAlgorithmAndParameters *apOpt,
00263   NSSItem *wrappedKey,
00264   NSSUTF8 *labelOpt,
00265   NSSItem *keyIDOpt,
00266   PRBool persistant,
00267   PRBool sensitive,
00268   NSSToken *destinationOpt,
00269   NSSCallback *uhh
00270 )
00271 {
00272     nss_SetError(NSS_ERROR_NOT_FOUND);
00273     return NULL;
00274 }
00275 
00276 NSS_IMPLEMENT NSSSymmetricKey *
00277 NSSSymmetricKey_DeriveSymmetricKey (
00278   NSSSymmetricKey *originalKey,
00279   NSSAlgorithmAndParameters *apOpt,
00280   NSSOID *target,
00281   PRUint32 keySizeOpt,
00282   NSSOperations operations,
00283   NSSCallback *uhh
00284 )
00285 {
00286     nss_SetError(NSS_ERROR_NOT_FOUND);
00287     return NULL;
00288 }
00289 
00290 NSS_IMPLEMENT NSSCryptoContext *
00291 NSSSymmetricKey_CreateCryptoContext (
00292   NSSSymmetricKey *mk,
00293   NSSAlgorithmAndParameters *apOpt,
00294   NSSCallback *uhh
00295 )
00296 {
00297     nss_SetError(NSS_ERROR_NOT_FOUND);
00298     return NULL;
00299 }
00300