Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abe integration #4

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions A.cert
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Bv0C2Ac7CANuZG4IA29yZwgEbWQyawgBQQgDS0VZCAi810k4DSJjowgNL25kbi9v
cmcvbWQyazYIAAABiCzKt98UCRgBAhkEADbugBX9ASYwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCpxfNUPfFUh7ydt4NeoqPX7DwibNLtc4BUqPH9emt5
dv0GraJlXiVFZLjB+Nq+Qubqp8qrnTNHktOOF9rYdGRJ4s34VEYUbAaZst+wja2/
G1S3nAOtVXzR7y8wXbq1okTIB9V8Zcb8djrQQyWglYbDMwAtMUlgXAEBf/CvKqaJ
9lXonCpxwMi/Exk8m1F9IjXm0ZRDfABtoQKraxS1FCLZHbd+1qWxh6mwb0OSwhs9
xHk5ikt2Xlgz283mQN1dAJ+CtA/zKcKW+yqHulrvnkq8WJBTc0ZMIujRjYMEhwjR
OEEv1KjUX+hLFzA5b3L0U9ZyDF7/pQokoDdUk8R02cwlAgMBAAEWYBsBARwxBy8I
A25kbggDb3JnCARtZDJrCANLRVkICNwzhc0VbKvECARzZWxmNggAAAGILMq20v0A
/Sb9AP4PMjAyMzA1MThUMDI1NzQz/QD/DzIwMjQwNTE3VDAyNTc0Mhf9AQAvaclL
mZvpL3VbBa0RQ/WFmKcaMyfBmNYFVyjtWPJ1puwAsjQdkkQNtfeS+0lmKjmkGEo7
o8LP+nyhG8V0U00FdeAk8kzTHv9k1DMJoKfRNbdhV9VknComrM3oe2E2RMFI+3rB
9Jmhr329onN1D6RYtkO4M/DA0VBGrSehkcDtMy8b4V6/Skue3lQYg+jqHL4l2zL6
C4lCRNa6+QKJT9RQZYLLeIwGInLn8v7M5XHpbG1JaZqc/D7SSkOaqgKyaAjUIQ6H
01xYYyT0c0sYrGXR8kWL1XoO831LjW49coqxvwnboAnKOOCalqPOdWvIImK2FfwN
mG0cajc+t+Z8B2CF
16 changes: 16 additions & 0 deletions A.ndncsr
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Bv0C2gc6CANuZG4IA29yZwgEbWQyawgBQQgDS0VZCAi810k4DSJjowgMY2VydC1y
ZXF1ZXN0NggAAAGILMq32hQJGAECGQQANu6AFf0BJjCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBAKnF81Q98VSHvJ23g16io9fsPCJs0u1zgFSo8f16a3l2
/QatomVeJUVkuMH42r5C5uqnyqudM0eS044X2th0ZEnizfhURhRsBpmy37CNrb8b
VLecA61VfNHvLzBdurWiRMgH1Xxlxvx2OtBDJaCVhsMzAC0xSWBcAQF/8K8qpon2
VeicKnHAyL8TGTybUX0iNebRlEN8AG2hAqtrFLUUItkdt37WpbGHqbBvQ5LCGz3E
eTmKS3ZeWDPbzeZA3V0An4K0D/Mpwpb7Koe6Wu+eSrxYkFNzRkwi6NGNgwSHCNE4
QS/UqNRf6EsXMDlvcvRT1nIMXv+lCiSgN1STxHTZzCUCAwEAARZjGwEBHDQHMggD
bmRuCANvcmcIBG1kMmsIAUEIA0tFWQgIvNdJOA0iY6MIBHNlbGY2CAAAAYgsyre3
/QD9Jv0A/g8yMDIzMDUxOFQwMjU3NDL9AP8PMjAyMzA1MjhUMDI1NzQyF/0BABqg
hthX0xp6o1t0n3bKiDb0t7R35rLvU4aTl8+G7Ri2/rokdMeF8SoVIwbkDiiGDVfi
xWdiV6KEwVt/94/R+GfhqdiwrCGNUTIy3ULUJy9BegaMvHhmzQTSprflNPjBF9Xg
8nBo+hYLudSEnW2L0ME53EDGDm8JZLzK57XzgpdOPBP+YFlgjg/wBrpYVldu/6/b
ZfJweEZ0TNVFEzX6QLraTcZZTNVInt49Clz5/SyyuFpNfyGXb3gjT06c6xS9gZFk
zekpICkccSi9cL4Xje2snPy/Qtz1BUEqA3Z32mJO0C4hkB7oi9cNQqns/J2ANGHJ
EkKPg7MVFSaLo6QF1Xs=
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(mguard
DESCRIPTION "mGuard")

# flags
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
if (HAVE_TESTS)
add_compile_definitions(HAVE_TESTS)
Expand Down Expand Up @@ -51,7 +51,7 @@ set(PKG_CONFIG_LIBS
set(PKG_CONFIG_CFLAGS
"-I\${includedir} -DMGUARD_CMAKE_BUILD"
)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake-pkgconfig.pc.in"
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mguard.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/lib${PROJECT_NAME}.pc")

include(GNUInstallDirs)
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Vagrant.configure("2") do |config|
echo "deb [arch=amd64 trusted=yes] https://nfd-nightly-apt.ndn.today/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/nfd-nightly.list

sudo apt update
sudo apt -y install nfd libndn-cxx-dev libpsync-dev ndn-tools python-is-python3 libgtkmm-3.0-dev libboost-all-dev
sudo apt -y install nfd libndn-cxx-dev libpsync-dev ndn-tools libgtkmm-3.0-dev libboost-all-dev
sudo apt -y upgrade

sudo apt-get -y install libgtest-dev cmake python3-pip
Expand Down
Binary file removed certs/.ndn/pib.db
Binary file not shown.
Empty file removed certs/.pib.db
Empty file.
16 changes: 0 additions & 16 deletions certs/aa.cert

This file was deleted.

16 changes: 0 additions & 16 deletions certs/controller.cert

This file was deleted.

9 changes: 6 additions & 3 deletions certs/create_certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ server_certs() {
ndnsec sign-req /ndn/org/md2k/mguard/aa > aa.ndncsr

ndnsec cert-gen -s /ndn/org/md2k -i /ndn/org/md2k aa.ndncsr > aa.cert
ndnsec cert-install aa.cert
ndnsec cert-gen -s /ndn/org/md2k -i /ndn/org/md2k controller.ndncsr > controller.cert
ndnsec cert-install controller.cert

ndnsec cert-dump -i /ndn/org/md2k > producer.cert
ndnsec cert-dump -i /ndn/org/md2k > md2k-trust-anchor.ndncert
}

consumer_cert() {
echo "Creating and installing consumer certificate"
ndnsec key-gen -t r /ndn/org/md2k/local
ndnsec sign-req /ndn/org/md2k/local > local.ndncsr
ndnsec cert-gen -s /ndn/org/md2k -i /ndn/org/md2k local.ndncsr > local.cert
ndnsec key-gen -t r /ndn/org/md2k/A
ndnsec sign-req /ndn/org/md2k/A > A.ndncsr
ndnsec cert-gen -s /ndn/org/md2k -i /ndn/org/md2k A.ndncsr > A.cert
ndnsec cert-install A.cert
}

if [ "$1" == "-a" ]; then
Expand Down
38 changes: 38 additions & 0 deletions certs/create_default_certs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

server_certs() {
echo "Installing server certs (producer, controller, and attribute authority)"
ndnsec key-gen /ndn/org/md2k
ndnsec key-gen /ndn/org/md2k/mguard/controller
ndnsec key-gen /ndn/org/md2k/mguard/aa

ndnsec sign-req /ndn/org/md2k/mguard/controller > controller.ndncsr
ndnsec sign-req /ndn/org/md2k/mguard/aa > aa.ndncsr

ndnsec cert-gen -s /ndn/org/md2k -i /ndn/org/md2k aa.ndncsr > aa.cert
ndnsec cert-install aa.cert
ndnsec cert-gen -s /ndn/org/md2k -i /ndn/org/md2k controller.ndncsr > controller.cert
ndnsec cert-install controller.cert

ndnsec cert-dump -i /ndn/org/md2k > producer.cert
ndnsec cert-dump -i /ndn/org/md2k > md2k-trust-anchor.ndncert
}

consumer_cert() {
echo "Creating and installing consumer certificate"
ndnsec key-gen /ndn/org/md2k/A
ndnsec sign-req /ndn/org/md2k/A > A.ndncsr
ndnsec cert-gen -s /ndn/org/md2k -i /ndn/org/md2k A.ndncsr > A.cert
ndnsec cert-install A.cert
}

if [ "$1" == "-a" ]; then
server_certs
sleep 1
consumer_cert
exit
fi

server_certs


15 changes: 0 additions & 15 deletions certs/producer.cert

This file was deleted.

9 changes: 8 additions & 1 deletion certs/trust-schema.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@

rule
{
id "simple rule"
id "digest rule"
for data
filter
{
type name
name /ndn/org/md2k
relation is-prefix-of
}

checker
{
type customized
sig-type sha256
}

checker
{
type customized
Expand Down
Loading