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:
parent
37eaff3b67
commit
72642ef556
4 changed files with 64 additions and 0 deletions
|
@ -50,6 +50,7 @@
|
||||||
#include "json/json.h"
|
#include "json/json.h"
|
||||||
#include "cbor/cbor.h"
|
#include "cbor/cbor.h"
|
||||||
#include "openssl.h"
|
#include "openssl.h"
|
||||||
|
#include "pbc.h"
|
||||||
#include "fmt.h"
|
#include "fmt.h"
|
||||||
#include "http.h"
|
#include "http.h"
|
||||||
#include "http2/http2.h"
|
#include "http2/http2.h"
|
||||||
|
|
19
include/ircd/pbc.h
Normal file
19
include/ircd/pbc.h
Normal 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)
|
||||||
|
|
||||||
|
}
|
|
@ -51,6 +51,7 @@ libircd_la_LDFLAGS = \
|
||||||
@JS_LDFLAGS@ \
|
@JS_LDFLAGS@ \
|
||||||
@BOOST_LDFLAGS@ \
|
@BOOST_LDFLAGS@ \
|
||||||
@SSL_LDFLAGS@ \
|
@SSL_LDFLAGS@ \
|
||||||
|
@PBC_LDFLAGS@ \
|
||||||
@CRYPTO_LDFLAGS@ \
|
@CRYPTO_LDFLAGS@ \
|
||||||
@SODIUM_LDFLAGS@ \
|
@SODIUM_LDFLAGS@ \
|
||||||
@MAGIC_LDFLAGS@ \
|
@MAGIC_LDFLAGS@ \
|
||||||
|
@ -64,6 +65,7 @@ libircd_la_LIBADD = \
|
||||||
@ROCKSDB_LIBS@ \
|
@ROCKSDB_LIBS@ \
|
||||||
@JS_LIBS@ \
|
@JS_LIBS@ \
|
||||||
@BOOST_LIBS@ \
|
@BOOST_LIBS@ \
|
||||||
|
@PBC_LIBS@ \
|
||||||
@SSL_LIBS@ \
|
@SSL_LIBS@ \
|
||||||
@CRYPTO_LIBS@ \
|
@CRYPTO_LIBS@ \
|
||||||
@SODIUM_LIBS@ \
|
@SODIUM_LIBS@ \
|
||||||
|
@ -119,6 +121,9 @@ endif
|
||||||
if SODIUM
|
if SODIUM
|
||||||
libircd_la_SOURCES += sodium.cc
|
libircd_la_SOURCES += sodium.cc
|
||||||
endif
|
endif
|
||||||
|
if PBC
|
||||||
|
libircd_la_SOURCES += pbc.cc
|
||||||
|
endif
|
||||||
libircd_la_SOURCES += openssl.cc
|
libircd_la_SOURCES += openssl.cc
|
||||||
libircd_la_SOURCES += rfc1459.cc
|
libircd_la_SOURCES += rfc1459.cc
|
||||||
libircd_la_SOURCES += rfc3986.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}
|
openssl.lo: AM_CPPFLAGS := @SSL_CPPFLAGS@ @CRYPTO_CPPFLAGS@ ${AM_CPPFLAGS}
|
||||||
parse.lo: AM_CPPFLAGS := ${SPIRIT_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
parse.lo: AM_CPPFLAGS := ${SPIRIT_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
||||||
parse.lo: AM_CXXFLAGS := ${SPIRIT_UNIT_CXXFLAGS} ${AM_CXXFLAGS}
|
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_CPPFLAGS := ${SPIRIT_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
||||||
rfc1459.lo: AM_CXXFLAGS := ${SPIRIT_UNIT_CXXFLAGS} ${AM_CXXFLAGS}
|
rfc1459.lo: AM_CXXFLAGS := ${SPIRIT_UNIT_CXXFLAGS} ${AM_CXXFLAGS}
|
||||||
rfc3986.lo: AM_CPPFLAGS := ${SPIRIT_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
rfc3986.lo: AM_CPPFLAGS := ${SPIRIT_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
||||||
|
|
36
ircd/pbc.cc
Normal file
36
ircd/pbc.cc
Normal 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()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue