wolfSSL 3.11.1 for TLS1.3 beta
Fork of wolfSSL by
wolfssl/wolfcrypt/pkcs12.h@13:80fb167dafdf, 2017-05-30 (annotated)
- Committer:
- wolfSSL
- Date:
- Tue May 30 06:16:19 2017 +0000
- Revision:
- 13:80fb167dafdf
- Parent:
- 11:cee25a834751
wolfSSL 3.11.1: TLS1.3 Beta
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wolfSSL | 11:cee25a834751 | 1 | /* pkcs12.h |
wolfSSL | 11:cee25a834751 | 2 | * |
wolfSSL | 11:cee25a834751 | 3 | * Copyright (C) 2006-2016 wolfSSL Inc. |
wolfSSL | 11:cee25a834751 | 4 | * |
wolfSSL | 11:cee25a834751 | 5 | * This file is part of wolfSSL. |
wolfSSL | 11:cee25a834751 | 6 | * |
wolfSSL | 11:cee25a834751 | 7 | * wolfSSL is free software; you can redistribute it and/or modify |
wolfSSL | 11:cee25a834751 | 8 | * it under the terms of the GNU General Public License as published by |
wolfSSL | 11:cee25a834751 | 9 | * the Free Software Foundation; either version 2 of the License, or |
wolfSSL | 11:cee25a834751 | 10 | * (at your option) any later version. |
wolfSSL | 11:cee25a834751 | 11 | * |
wolfSSL | 11:cee25a834751 | 12 | * wolfSSL is distributed in the hope that it will be useful, |
wolfSSL | 11:cee25a834751 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
wolfSSL | 11:cee25a834751 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
wolfSSL | 11:cee25a834751 | 15 | * GNU General Public License for more details. |
wolfSSL | 11:cee25a834751 | 16 | * |
wolfSSL | 11:cee25a834751 | 17 | * You should have received a copy of the GNU General Public License |
wolfSSL | 11:cee25a834751 | 18 | * along with this program; if not, write to the Free Software |
wolfSSL | 11:cee25a834751 | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA |
wolfSSL | 11:cee25a834751 | 20 | */ |
wolfSSL | 11:cee25a834751 | 21 | |
wolfSSL | 11:cee25a834751 | 22 | |
wolfSSL | 11:cee25a834751 | 23 | #ifndef WOLF_CRYPT_PKCS12_H |
wolfSSL | 11:cee25a834751 | 24 | #define WOLF_CRYPT_PKCS12_H |
wolfSSL | 11:cee25a834751 | 25 | |
wolfSSL | 11:cee25a834751 | 26 | #include <wolfssl/wolfcrypt/types.h> |
wolfSSL | 11:cee25a834751 | 27 | |
wolfSSL | 11:cee25a834751 | 28 | #ifdef __cplusplus |
wolfSSL | 11:cee25a834751 | 29 | extern "C" { |
wolfSSL | 11:cee25a834751 | 30 | #endif |
wolfSSL | 11:cee25a834751 | 31 | |
wolfSSL | 11:cee25a834751 | 32 | #ifndef WOLFSSL_TYPES_DEFINED /* do not redeclare from ssl.h */ |
wolfSSL | 11:cee25a834751 | 33 | typedef struct WC_PKCS12 WC_PKCS12; |
wolfSSL | 11:cee25a834751 | 34 | #endif |
wolfSSL | 11:cee25a834751 | 35 | |
wolfSSL | 11:cee25a834751 | 36 | typedef struct WC_DerCertList { /* dereferenced in ssl.c */ |
wolfSSL | 11:cee25a834751 | 37 | byte* buffer; |
wolfSSL | 11:cee25a834751 | 38 | word32 bufferSz; |
wolfSSL | 11:cee25a834751 | 39 | struct WC_DerCertList* next; |
wolfSSL | 11:cee25a834751 | 40 | } WC_DerCertList; |
wolfSSL | 11:cee25a834751 | 41 | |
wolfSSL | 11:cee25a834751 | 42 | |
wolfSSL | 11:cee25a834751 | 43 | |
wolfSSL | 11:cee25a834751 | 44 | WOLFSSL_API WC_PKCS12* wc_PKCS12_new(void); |
wolfSSL | 11:cee25a834751 | 45 | WOLFSSL_API void wc_PKCS12_free(WC_PKCS12* pkcs12); |
wolfSSL | 11:cee25a834751 | 46 | WOLFSSL_API int wc_d2i_PKCS12(const byte* der, word32 derSz, WC_PKCS12* pkcs12); |
wolfSSL | 11:cee25a834751 | 47 | WOLFSSL_API int wc_PKCS12_parse(WC_PKCS12* pkcs12, const char* psw, |
wolfSSL | 11:cee25a834751 | 48 | byte** pkey, word32* pkeySz, byte** cert, word32* certSz, |
wolfSSL | 11:cee25a834751 | 49 | WC_DerCertList** ca); |
wolfSSL | 11:cee25a834751 | 50 | |
wolfSSL | 11:cee25a834751 | 51 | WOLFSSL_LOCAL int wc_PKCS12_SetHeap(WC_PKCS12* pkcs12, void* heap); |
wolfSSL | 11:cee25a834751 | 52 | WOLFSSL_LOCAL void* wc_PKCS12_GetHeap(WC_PKCS12* pkcs12); |
wolfSSL | 11:cee25a834751 | 53 | |
wolfSSL | 11:cee25a834751 | 54 | |
wolfSSL | 11:cee25a834751 | 55 | #ifdef __cplusplus |
wolfSSL | 11:cee25a834751 | 56 | } /* extern "C" */ |
wolfSSL | 11:cee25a834751 | 57 | #endif |
wolfSSL | 11:cee25a834751 | 58 | |
wolfSSL | 11:cee25a834751 | 59 | #endif /* WOLF_CRYPT_PKCS12_H */ |
wolfSSL | 11:cee25a834751 | 60 | |
wolfSSL | 11:cee25a834751 | 61 |