encoding: make Block convertible to span
Change-Id: Idb501467d1c56b95e7fdb76acda63b919fe98f85
diff --git a/tools/ndnsec/cert-dump.cpp b/tools/ndnsec/cert-dump.cpp
index 9f86f1c..b5ac12f 100644
--- a/tools/ndnsec/cert-dump.cpp
+++ b/tools/ndnsec/cert-dump.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -132,7 +132,7 @@
std::cerr << "ERROR: Failed to connect to repo instance" << std::endl;
return 1;
}
- requestStream.write(reinterpret_cast<const char*>(certificate.wireEncode().wire()),
+ requestStream.write(reinterpret_cast<const char*>(certificate.wireEncode().data()),
certificate.wireEncode().size());
return 0;
}
diff --git a/tools/ndnsec/cert-gen.cpp b/tools/ndnsec/cert-gen.cpp
index 51ad678..e44d063 100644
--- a/tools/ndnsec/cert-gen.cpp
+++ b/tools/ndnsec/cert-gen.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -160,8 +160,7 @@
{
using namespace security::transform;
- const auto& wire = cert.wireEncode();
- bufferSource(make_span(wire.wire(), wire.size())) >> base64Encode(true) >> streamSink(std::cout);
+ bufferSource(cert.wireEncode()) >> base64Encode(true) >> streamSink(std::cout);
}
return 0;