wolfSSL SSL/TLS library, support up to TLS1.3

Dependents:   CyaSSL-Twitter-OAuth4Tw Example-client-tls-cert TwitterReader TweetTest ... more

Committer:
wolfSSL
Date:
Tue May 02 08:44:26 2017 +0000
Revision:
6:fa3bd0ca5896
wolfSSL3.10.2;

Who changed what in which revision?

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