TuyaOS
tal_x509.h
浏览该文件的文档.
1
10#ifndef __TAL_X509_H__
11#define __TAL_X509_H__
12
13#include "tuya_cloud_types.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19typedef enum{
20 X509_fingerprint_SHA1 = 0,
21 X509_fingerprint_SHA256 = 1,
22}X509_fingerprint;
23
24typedef PVOID_T tuya_x509_struct;
25
26BOOL_T tuya_x509_is_ca_pem_format(UINT8_T *buf, UINT32_T buflen);
27OPERATE_RET tuya_x509_pem2der(UINT8_T *buf, UINT32_T buflen, UINT8_T **out, UINT32_T *outlen);
28OPERATE_RET tuya_x509_get_serial( UINT8_T *buf, UINT32_T buflen,UINT8_T out[32], UINT32_T *outlen);
29OPERATE_RET tuya_x509_get_fingerprint( UINT8_T *buf, UINT32_T buflen, X509_fingerprint type, UINT8_T out[64], UINT32_T *outlen );
30OPERATE_RET tuya_x509_self_test( void );
31
32#ifdef __cplusplus
33}
34#endif /* __cplusplus */
35
36#endif
37