luasec/src/x509.h

32 lines
769 B
C
Raw Normal View History

2013-03-30 13:21:40 +01:00
/*--------------------------------------------------------------------------
2015-08-21 16:21:16 +02:00
* LuaSec 0.6a
2014-01-29 21:43:33 +01:00
*
2015-08-21 16:21:16 +02:00
* Copyright (C) 2014-2015 Kim Alvefur, Paul Aurich, Tobias Markmann
* Matthew Wild, Bruno Silvestre.
2013-03-30 13:21:40 +01:00
*
*--------------------------------------------------------------------------*/
2014-01-29 21:43:33 +01:00
#ifndef LSEC_X509_H
#define LSEC_X509_H
2013-03-30 13:21:40 +01:00
#include <openssl/x509v3.h>
#include <lua.h>
#include "config.h"
/* We do not support UniversalString nor BMPString as ASN.1 String types */
enum { LSEC_AI5_STRING, LSEC_UTF8_STRING };
2013-03-30 13:21:40 +01:00
typedef struct t_x509_ {
X509 *cert;
int encode;
2013-03-30 13:21:40 +01:00
} t_x509;
typedef t_x509* p_x509;
void lsec_pushx509(lua_State* L, X509* cert);
X509* lsec_checkx509(lua_State* L, int idx);
LSEC_API int luaopen_ssl_x509(lua_State *L);
#endif