| OLD | NEW |
| (Empty) |
| 1 /* This Source Code Form is subject to the terms of the Mozilla Public | |
| 2 * License, v. 2.0. If a copy of the MPL was not distributed with this | |
| 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
| 4 | |
| 5 #ifndef NSSPKI_H | |
| 6 #include "nsspki.h" | |
| 7 #endif /* NSSPKI_H */ | |
| 8 | |
| 9 #ifndef BASE_H | |
| 10 #include "base.h" | |
| 11 #endif /* BASE_H */ | |
| 12 | |
| 13 extern const NSSError NSS_ERROR_NOT_FOUND; | |
| 14 | |
| 15 NSS_IMPLEMENT PRStatus | |
| 16 NSSPrivateKey_Destroy ( | |
| 17 NSSPrivateKey *vk | |
| 18 ) | |
| 19 { | |
| 20 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 21 return PR_FAILURE; | |
| 22 } | |
| 23 | |
| 24 NSS_IMPLEMENT PRStatus | |
| 25 NSSPrivateKey_DeleteStoredObject ( | |
| 26 NSSPrivateKey *vk, | |
| 27 NSSCallback *uhh | |
| 28 ) | |
| 29 { | |
| 30 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 31 return PR_FAILURE; | |
| 32 } | |
| 33 | |
| 34 NSS_IMPLEMENT PRUint32 | |
| 35 NSSPrivateKey_GetSignatureLength ( | |
| 36 NSSPrivateKey *vk | |
| 37 ) | |
| 38 { | |
| 39 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 40 return -1; | |
| 41 } | |
| 42 | |
| 43 NSS_IMPLEMENT PRUint32 | |
| 44 NSSPrivateKey_GetPrivateModulusLength ( | |
| 45 NSSPrivateKey *vk | |
| 46 ) | |
| 47 { | |
| 48 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 49 return -1; | |
| 50 } | |
| 51 | |
| 52 NSS_IMPLEMENT PRBool | |
| 53 NSSPrivateKey_IsStillPresent ( | |
| 54 NSSPrivateKey *vk, | |
| 55 PRStatus *statusOpt | |
| 56 ) | |
| 57 { | |
| 58 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 59 return PR_FALSE; | |
| 60 } | |
| 61 | |
| 62 NSS_IMPLEMENT NSSItem * | |
| 63 NSSPrivateKey_Encode ( | |
| 64 NSSPrivateKey *vk, | |
| 65 NSSAlgorithmAndParameters *ap, | |
| 66 NSSItem *passwordOpt, /* NULL will cause a callback; "" for no password */ | |
| 67 NSSCallback *uhhOpt, | |
| 68 NSSItem *rvOpt, | |
| 69 NSSArena *arenaOpt | |
| 70 ) | |
| 71 { | |
| 72 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 73 return NULL; | |
| 74 } | |
| 75 | |
| 76 NSS_IMPLEMENT NSSTrustDomain * | |
| 77 NSSPrivateKey_GetTrustDomain ( | |
| 78 NSSPrivateKey *vk, | |
| 79 PRStatus *statusOpt | |
| 80 ) | |
| 81 { | |
| 82 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 83 return NULL; | |
| 84 } | |
| 85 | |
| 86 NSS_IMPLEMENT NSSToken * | |
| 87 NSSPrivateKey_GetToken ( | |
| 88 NSSPrivateKey *vk | |
| 89 ) | |
| 90 { | |
| 91 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 92 return NULL; | |
| 93 } | |
| 94 | |
| 95 NSS_IMPLEMENT NSSSlot * | |
| 96 NSSPrivateKey_GetSlot ( | |
| 97 NSSPrivateKey *vk | |
| 98 ) | |
| 99 { | |
| 100 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 101 return NULL; | |
| 102 } | |
| 103 | |
| 104 NSS_IMPLEMENT NSSModule * | |
| 105 NSSPrivateKey_GetModule ( | |
| 106 NSSPrivateKey *vk | |
| 107 ) | |
| 108 { | |
| 109 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 110 return NULL; | |
| 111 } | |
| 112 | |
| 113 NSS_IMPLEMENT NSSItem * | |
| 114 NSSPrivateKey_Decrypt ( | |
| 115 NSSPrivateKey *vk, | |
| 116 NSSAlgorithmAndParameters *apOpt, | |
| 117 NSSItem *encryptedData, | |
| 118 NSSCallback *uhh, | |
| 119 NSSItem *rvOpt, | |
| 120 NSSArena *arenaOpt | |
| 121 ) | |
| 122 { | |
| 123 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 124 return NULL; | |
| 125 } | |
| 126 | |
| 127 NSS_IMPLEMENT NSSItem * | |
| 128 NSSPrivateKey_Sign ( | |
| 129 NSSPrivateKey *vk, | |
| 130 NSSAlgorithmAndParameters *apOpt, | |
| 131 NSSItem *data, | |
| 132 NSSCallback *uhh, | |
| 133 NSSItem *rvOpt, | |
| 134 NSSArena *arenaOpt | |
| 135 ) | |
| 136 { | |
| 137 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 138 return NULL; | |
| 139 } | |
| 140 | |
| 141 NSS_IMPLEMENT NSSItem * | |
| 142 NSSPrivateKey_SignRecover ( | |
| 143 NSSPrivateKey *vk, | |
| 144 NSSAlgorithmAndParameters *apOpt, | |
| 145 NSSItem *data, | |
| 146 NSSCallback *uhh, | |
| 147 NSSItem *rvOpt, | |
| 148 NSSArena *arenaOpt | |
| 149 ) | |
| 150 { | |
| 151 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 152 return NULL; | |
| 153 } | |
| 154 | |
| 155 NSS_IMPLEMENT NSSSymmetricKey * | |
| 156 NSSPrivateKey_UnwrapSymmetricKey ( | |
| 157 NSSPrivateKey *vk, | |
| 158 NSSAlgorithmAndParameters *apOpt, | |
| 159 NSSItem *wrappedKey, | |
| 160 NSSCallback *uhh | |
| 161 ) | |
| 162 { | |
| 163 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 164 return NULL; | |
| 165 } | |
| 166 | |
| 167 NSS_IMPLEMENT NSSSymmetricKey * | |
| 168 NSSPrivateKey_DeriveSymmetricKey ( | |
| 169 NSSPrivateKey *vk, | |
| 170 NSSPublicKey *bk, | |
| 171 NSSAlgorithmAndParameters *apOpt, | |
| 172 NSSOID *target, | |
| 173 PRUint32 keySizeOpt, /* zero for best allowed */ | |
| 174 NSSOperations operations, | |
| 175 NSSCallback *uhh | |
| 176 ) | |
| 177 { | |
| 178 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 179 return NULL; | |
| 180 } | |
| 181 | |
| 182 NSS_IMPLEMENT NSSPublicKey * | |
| 183 NSSPrivateKey_FindPublicKey ( | |
| 184 NSSPrivateKey *vk | |
| 185 /* { don't need the callback here, right? } */ | |
| 186 ) | |
| 187 { | |
| 188 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 189 return NULL; | |
| 190 } | |
| 191 | |
| 192 NSS_IMPLEMENT NSSCryptoContext * | |
| 193 NSSPrivateKey_CreateCryptoContext ( | |
| 194 NSSPrivateKey *vk, | |
| 195 NSSAlgorithmAndParameters *apOpt, | |
| 196 NSSCallback *uhh | |
| 197 ) | |
| 198 { | |
| 199 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 200 return NULL; | |
| 201 } | |
| 202 | |
| 203 NSS_IMPLEMENT NSSCertificate ** | |
| 204 NSSPrivateKey_FindCertificates ( | |
| 205 NSSPrivateKey *vk, | |
| 206 NSSCertificate *rvOpt[], | |
| 207 PRUint32 maximumOpt, /* 0 for no max */ | |
| 208 NSSArena *arenaOpt | |
| 209 ) | |
| 210 { | |
| 211 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 212 return NULL; | |
| 213 } | |
| 214 | |
| 215 NSS_IMPLEMENT NSSCertificate * | |
| 216 NSSPrivateKey_FindBestCertificate ( | |
| 217 NSSPrivateKey *vk, | |
| 218 NSSTime *timeOpt, | |
| 219 NSSUsage *usageOpt, | |
| 220 NSSPolicies *policiesOpt | |
| 221 ) | |
| 222 { | |
| 223 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 224 return NULL; | |
| 225 } | |
| 226 | |
| 227 NSS_IMPLEMENT PRStatus | |
| 228 NSSPublicKey_Destroy ( | |
| 229 NSSPublicKey *bk | |
| 230 ) | |
| 231 { | |
| 232 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 233 return PR_FAILURE; | |
| 234 } | |
| 235 | |
| 236 NSS_IMPLEMENT PRStatus | |
| 237 NSSPublicKey_DeleteStoredObject ( | |
| 238 NSSPublicKey *bk, | |
| 239 NSSCallback *uhh | |
| 240 ) | |
| 241 { | |
| 242 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 243 return PR_FAILURE; | |
| 244 } | |
| 245 | |
| 246 NSS_IMPLEMENT NSSItem * | |
| 247 NSSPublicKey_Encode ( | |
| 248 NSSPublicKey *bk, | |
| 249 NSSAlgorithmAndParameters *ap, | |
| 250 NSSCallback *uhhOpt, | |
| 251 NSSItem *rvOpt, | |
| 252 NSSArena *arenaOpt | |
| 253 ) | |
| 254 { | |
| 255 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 256 return NULL; | |
| 257 } | |
| 258 | |
| 259 NSS_IMPLEMENT NSSTrustDomain * | |
| 260 NSSPublicKey_GetTrustDomain ( | |
| 261 NSSPublicKey *bk, | |
| 262 PRStatus *statusOpt | |
| 263 ) | |
| 264 { | |
| 265 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 266 return NULL; | |
| 267 } | |
| 268 | |
| 269 NSS_IMPLEMENT NSSToken * | |
| 270 NSSPublicKey_GetToken ( | |
| 271 NSSPublicKey *bk, | |
| 272 PRStatus *statusOpt | |
| 273 ) | |
| 274 { | |
| 275 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 276 return NULL; | |
| 277 } | |
| 278 | |
| 279 NSS_IMPLEMENT NSSSlot * | |
| 280 NSSPublicKey_GetSlot ( | |
| 281 NSSPublicKey *bk, | |
| 282 PRStatus *statusOpt | |
| 283 ) | |
| 284 { | |
| 285 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 286 return NULL; | |
| 287 } | |
| 288 | |
| 289 NSS_IMPLEMENT NSSModule * | |
| 290 NSSPublicKey_GetModule ( | |
| 291 NSSPublicKey *bk, | |
| 292 PRStatus *statusOpt | |
| 293 ) | |
| 294 { | |
| 295 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 296 return NULL; | |
| 297 } | |
| 298 | |
| 299 NSS_IMPLEMENT NSSItem * | |
| 300 NSSPublicKey_Encrypt ( | |
| 301 NSSPublicKey *bk, | |
| 302 NSSAlgorithmAndParameters *apOpt, | |
| 303 NSSItem *data, | |
| 304 NSSCallback *uhh, | |
| 305 NSSItem *rvOpt, | |
| 306 NSSArena *arenaOpt | |
| 307 ) | |
| 308 { | |
| 309 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 310 return NULL; | |
| 311 } | |
| 312 | |
| 313 NSS_IMPLEMENT PRStatus | |
| 314 NSSPublicKey_Verify ( | |
| 315 NSSPublicKey *bk, | |
| 316 NSSAlgorithmAndParameters *apOpt, | |
| 317 NSSItem *data, | |
| 318 NSSItem *signature, | |
| 319 NSSCallback *uhh | |
| 320 ) | |
| 321 { | |
| 322 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 323 return PR_FAILURE; | |
| 324 } | |
| 325 | |
| 326 NSS_IMPLEMENT NSSItem * | |
| 327 NSSPublicKey_VerifyRecover ( | |
| 328 NSSPublicKey *bk, | |
| 329 NSSAlgorithmAndParameters *apOpt, | |
| 330 NSSItem *signature, | |
| 331 NSSCallback *uhh, | |
| 332 NSSItem *rvOpt, | |
| 333 NSSArena *arenaOpt | |
| 334 ) | |
| 335 { | |
| 336 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 337 return NULL; | |
| 338 } | |
| 339 | |
| 340 NSS_IMPLEMENT NSSItem * | |
| 341 NSSPublicKey_WrapSymmetricKey ( | |
| 342 NSSPublicKey *bk, | |
| 343 NSSAlgorithmAndParameters *apOpt, | |
| 344 NSSSymmetricKey *keyToWrap, | |
| 345 NSSCallback *uhh, | |
| 346 NSSItem *rvOpt, | |
| 347 NSSArena *arenaOpt | |
| 348 ) | |
| 349 { | |
| 350 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 351 return NULL; | |
| 352 } | |
| 353 | |
| 354 NSS_IMPLEMENT NSSCryptoContext * | |
| 355 NSSPublicKey_CreateCryptoContext ( | |
| 356 NSSPublicKey *bk, | |
| 357 NSSAlgorithmAndParameters *apOpt, | |
| 358 NSSCallback *uhh | |
| 359 ) | |
| 360 { | |
| 361 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 362 return NULL; | |
| 363 } | |
| 364 | |
| 365 NSS_IMPLEMENT NSSCertificate ** | |
| 366 NSSPublicKey_FindCertificates ( | |
| 367 NSSPublicKey *bk, | |
| 368 NSSCertificate *rvOpt[], | |
| 369 PRUint32 maximumOpt, /* 0 for no max */ | |
| 370 NSSArena *arenaOpt | |
| 371 ) | |
| 372 { | |
| 373 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 374 return NULL; | |
| 375 } | |
| 376 | |
| 377 NSS_IMPLEMENT NSSCertificate * | |
| 378 NSSPublicKey_FindBestCertificate ( | |
| 379 NSSPublicKey *bk, | |
| 380 NSSTime *timeOpt, | |
| 381 NSSUsage *usageOpt, | |
| 382 NSSPolicies *policiesOpt | |
| 383 ) | |
| 384 { | |
| 385 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 386 return NULL; | |
| 387 } | |
| 388 | |
| 389 NSS_IMPLEMENT NSSPrivateKey * | |
| 390 NSSPublicKey_FindPrivateKey ( | |
| 391 NSSPublicKey *bk, | |
| 392 NSSCallback *uhh | |
| 393 ) | |
| 394 { | |
| 395 nss_SetError(NSS_ERROR_NOT_FOUND); | |
| 396 return NULL; | |
| 397 } | |
| 398 | |
| OLD | NEW |