Exemplo n.º 1
0
static int openssl_xext_read(lua_State* L)
{
  size_t size;
  const unsigned char* s = (const unsigned char*)luaL_checklstring(L, 1, &size);
  X509_EXTENSION *x = d2i_X509_EXTENSION(NULL, &s, size);
  if (x)
  {
    PUSH_OBJECT(x, "openssl.x509_extension");
  }
  else
    lua_pushnil(L);
  return 1;
};
Exemplo n.º 2
0
		inline extension extension::from_der(const void* buf, size_t buf_len)
		{
			const unsigned char* pbuf = static_cast<const unsigned char*>(buf);

			return take_ownership(d2i_X509_EXTENSION(NULL, &pbuf, static_cast<long>(buf_len)));
		}