0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

ircd: Add PBC stub.

This commit is contained in:
Jason Volk 2020-02-11 15:38:27 -08:00
parent 37eaff3b67
commit 72642ef556
4 changed files with 64 additions and 0 deletions

View file

@ -50,6 +50,7 @@
#include "json/json.h"
#include "cbor/cbor.h"
#include "openssl.h"
#include "pbc.h"
#include "fmt.h"
#include "http.h"
#include "http2/http2.h"

19
include/ircd/pbc.h Normal file
View file

@ -0,0 +1,19 @@
// Matrix Construct
//
// Copyright (C) Matrix Construct Developers, Authors & Contributors
// Copyright (C) 2016-2020 Jason Volk <jason@zemos.net>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file.
#pragma once
#define HAVE_IRCD_PBC_H
/// Pairing-Based Cryptography
namespace ircd::pbc
{
IRCD_EXCEPTION(ircd::error, error)
}

View file

@ -51,6 +51,7 @@ libircd_la_LDFLAGS = \
@JS_LDFLAGS@ \
@BOOST_LDFLAGS@ \
@SSL_LDFLAGS@ \
@PBC_LDFLAGS@ \
@CRYPTO_LDFLAGS@ \
@SODIUM_LDFLAGS@ \
@MAGIC_LDFLAGS@ \
@ -64,6 +65,7 @@ libircd_la_LIBADD = \
@ROCKSDB_LIBS@ \
@JS_LIBS@ \
@BOOST_LIBS@ \
@PBC_LIBS@ \
@SSL_LIBS@ \
@CRYPTO_LIBS@ \
@SODIUM_LIBS@ \
@ -119,6 +121,9 @@ endif
if SODIUM
libircd_la_SOURCES += sodium.cc
endif
if PBC
libircd_la_SOURCES += pbc.cc
endif
libircd_la_SOURCES += openssl.cc
libircd_la_SOURCES += rfc1459.cc
libircd_la_SOURCES += rfc3986.cc
@ -210,6 +215,9 @@ net_dns_resolver.lo: AM_CPPFLAGS := ${ASIO_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
openssl.lo: AM_CPPFLAGS := @SSL_CPPFLAGS@ @CRYPTO_CPPFLAGS@ ${AM_CPPFLAGS}
parse.lo: AM_CPPFLAGS := ${SPIRIT_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
parse.lo: AM_CXXFLAGS := ${SPIRIT_UNIT_CXXFLAGS} ${AM_CXXFLAGS}
if PBC
pbc.lo: AM_CPPFLAGS := @PBC_CPPFLAGS@ ${AM_CPPFLAGS}
endif
rfc1459.lo: AM_CPPFLAGS := ${SPIRIT_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
rfc1459.lo: AM_CXXFLAGS := ${SPIRIT_UNIT_CXXFLAGS} ${AM_CXXFLAGS}
rfc3986.lo: AM_CPPFLAGS := ${SPIRIT_UNIT_CPPFLAGS} ${AM_CPPFLAGS}

36
ircd/pbc.cc Normal file
View file

@ -0,0 +1,36 @@
// Matrix Construct
//
// Copyright (C) Matrix Construct Developers, Authors & Contributors
// Copyright (C) 2016-2020 Jason Volk <jason@zemos.net>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file.
#include <pbc.h>
namespace ircd::pbc
{
static void init() __attribute__((constructor));
extern info::versions version_api, version_abi;
}
decltype(ircd::pbc::version_api)
ircd::pbc::version_api
{
"pbc", info::versions::API, 0
};
decltype(ircd::pbc::version_abi)
ircd::pbc::version_abi
{
"pbc", info::versions::ABI, 0
};
void
ircd::pbc::init()
{
}