OLD | NEW |
1 /* | 1 /* |
2 * loader.h - load platform dependent DSO containing freebl implementation. | 2 * loader.h - load platform dependent DSO containing freebl implementation. |
3 * | 3 * |
4 * This Source Code Form is subject to the terms of the Mozilla Public | 4 * This Source Code Form is subject to the terms of the Mozilla Public |
5 * License, v. 2.0. If a copy of the MPL was not distributed with this | 5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
7 | 7 |
8 #ifndef _LOADER_H_ | 8 #ifndef _LOADER_H_ |
9 #define _LOADER_H_ 1 | 9 #define _LOADER_H_ 1 |
10 | 10 |
11 #include "blapi.h" | 11 #include "blapi.h" |
12 | 12 |
13 #define FREEBL_VERSION 0x0311 | 13 #define FREEBL_VERSION 0x0312 |
14 | 14 |
15 struct FREEBLVectorStr { | 15 struct FREEBLVectorStr { |
16 | 16 |
17 unsigned short length; /* of this struct in bytes */ | 17 unsigned short length; /* of this struct in bytes */ |
18 unsigned short version; /* of this struct. */ | 18 unsigned short version; /* of this struct. */ |
19 | 19 |
20 RSAPrivateKey * (* p_RSA_NewKey)(int keySizeInBits, | 20 RSAPrivateKey * (* p_RSA_NewKey)(int keySizeInBits, |
21 SECItem * publicExponent); | 21 SECItem * publicExponent); |
22 | 22 |
23 SECStatus (* p_RSA_PublicKeyOp) (RSAPublicKey * key, | 23 SECStatus (* p_RSA_PublicKeyOp) (RSAPublicKey * key, |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 | 700 |
701 SECStatus (* p_EC_FillParams)(PLArenaPool *arena, | 701 SECStatus (* p_EC_FillParams)(PLArenaPool *arena, |
702 const SECItem *encodedParams, ECParams *params); | 702 const SECItem *encodedParams, ECParams *params); |
703 SECStatus (* p_EC_DecodeParams)(const SECItem *encodedParams, | 703 SECStatus (* p_EC_DecodeParams)(const SECItem *encodedParams, |
704 ECParams **ecparams); | 704 ECParams **ecparams); |
705 SECStatus (* p_EC_CopyParams)(PLArenaPool *arena, ECParams *dstParams, | 705 SECStatus (* p_EC_CopyParams)(PLArenaPool *arena, ECParams *dstParams, |
706 const ECParams *srcParams); | 706 const ECParams *srcParams); |
707 | 707 |
708 /* Version 3.017 came to here */ | 708 /* Version 3.017 came to here */ |
709 | 709 |
| 710 SECStatus (* p_ChaCha20Poly1305_InitContext)(ChaCha20Poly1305Context *ctx, |
| 711 const unsigned char *key, |
| 712 unsigned int keyLen, |
| 713 unsigned int tagLen); |
| 714 |
| 715 ChaCha20Poly1305Context *(* p_ChaCha20Poly1305_CreateContext)( |
| 716 const unsigned char *key, unsigned int keyLen, unsigned int tagLen); |
| 717 |
| 718 void (* p_ChaCha20Poly1305_DestroyContext)(ChaCha20Poly1305Context *ctx, |
| 719 PRBool freeit); |
| 720 |
| 721 SECStatus (* p_ChaCha20Poly1305_Seal)( |
| 722 const ChaCha20Poly1305Context *ctx, unsigned char *output, |
| 723 unsigned int *outputLen, unsigned int maxOutputLen, |
| 724 const unsigned char *input, unsigned int inputLen, |
| 725 const unsigned char *nonce, unsigned int nonceLen, |
| 726 const unsigned char *ad, unsigned int adLen); |
| 727 |
| 728 SECStatus (* p_ChaCha20Poly1305_Open)( |
| 729 const ChaCha20Poly1305Context *ctx, unsigned char *output, |
| 730 unsigned int *outputLen, unsigned int maxOutputLen, |
| 731 const unsigned char *input, unsigned int inputLen, |
| 732 const unsigned char *nonce, unsigned int nonceLen, |
| 733 const unsigned char *ad, unsigned int adLen); |
| 734 |
| 735 /* Version 3.018 came to here */ |
| 736 |
710 /* Add new function pointers at the end of this struct and bump | 737 /* Add new function pointers at the end of this struct and bump |
711 * FREEBL_VERSION at the beginning of this file. */ | 738 * FREEBL_VERSION at the beginning of this file. */ |
712 }; | 739 }; |
713 | 740 |
714 typedef struct FREEBLVectorStr FREEBLVector; | 741 typedef struct FREEBLVectorStr FREEBLVector; |
715 | 742 |
716 SEC_BEGIN_PROTOS | 743 SEC_BEGIN_PROTOS |
717 | 744 |
718 typedef const FREEBLVector * FREEBLGetVectorFn(void); | 745 typedef const FREEBLVector * FREEBLGetVectorFn(void); |
719 | 746 |
720 extern FREEBLGetVectorFn FREEBL_GetVector; | 747 extern FREEBLGetVectorFn FREEBL_GetVector; |
721 | 748 |
722 SEC_END_PROTOS | 749 SEC_END_PROTOS |
723 | 750 |
724 #endif | 751 #endif |
OLD | NEW |