Copyright (C) 2017-2018 Regents of the University of California. More...
#include <identity-management-fixture.hpp>
Public Member Functions | |
| bool | saveCertificateToFile (const ndn::Data &data, const std::string &filePath) |
| ndn::ptr_lib::shared_ptr < ndn::PibIdentity > | addIdentity (const ndn::Name &identityName, const ndn::KeyParams ¶ms=ndn::KeyChain::getDefaultKeyParams()) |
| Add an identity for the identityName. More... | |
| bool | saveCertificate (ndn::PibIdentity identity, const std::string &filePath) |
| Save the identity's certificate to a file. More... | |
| ndn::ptr_lib::shared_ptr < ndn::PibIdentity > | addSubCertificate (const ndn::Name &subIdentityName, const ndn::ptr_lib::shared_ptr< ndn::PibIdentity > &issuer, const ndn::KeyParams ¶ms=ndn::KeyChain::getDefaultKeyParams()) |
| Issue a certificate for subIdentityName signed by issuer. More... | |
| ndn::ptr_lib::shared_ptr < ndn::CertificateV2 > | addCertificate (ndn::ptr_lib::shared_ptr< ndn::PibKey > &key, const std::string &issuerId) |
| Add a self-signed certificate made from the key and issuer ID. More... | |
Public Attributes | |
| ndn::KeyChain | keyChain_ |
Copyright (C) 2017-2018 Regents of the University of California.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version, with the additional exemption that compiling, linking, and/or using OpenSSL is allowed.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/. A copy of the GNU Lesser General Public License is in the file COPYING.
| ptr_lib::shared_ptr< CertificateV2 > IdentityManagementFixture::addCertificate | ( | ndn::ptr_lib::shared_ptr< ndn::PibKey > & | key, |
| const std::string & | issuerId | ||
| ) |
Add a self-signed certificate made from the key and issuer ID.
| key | The key for the certificate. |
| issuerId | The issuer ID name component for the certificate name. |
| ptr_lib::shared_ptr< PibIdentity > IdentityManagementFixture::addIdentity | ( | const ndn::Name & | identityName, |
| const ndn::KeyParams & | params = ndn::KeyChain::getDefaultKeyParams() |
||
| ) |
Add an identity for the identityName.
| identityName | The name of the identity. |
| params | (optional) The key parameters if a key needs to be generated for the identity. If omitted, use getDefaultKeyParams(). |
| ptr_lib::shared_ptr< PibIdentity > IdentityManagementFixture::addSubCertificate | ( | const ndn::Name & | subIdentityName, |
| const ndn::ptr_lib::shared_ptr< ndn::PibIdentity > & | issuer, | ||
| const ndn::KeyParams & | params = ndn::KeyChain::getDefaultKeyParams() |
||
| ) |
Issue a certificate for subIdentityName signed by issuer.
If the identity does not exist, it is created. A new key is generated as the default key for the identity. A default certificate for the key is signed by the issuer using its default certificate.
| subIdentityName | The name to issue the certificate for. |
| issuer | The identity of the signer. |
| params | (optional) The key parameters if a key needs to be generated for the identity. If omitted, use getDefaultKeyParams(). |
| bool IdentityManagementFixture::saveCertificate | ( | ndn::PibIdentity | identity, |
| const std::string & | filePath | ||
| ) |
Save the identity's certificate to a file.
| identity | The PibIdentity. |
| filePath | The file path, which should be writable. |
1.8.6