Automagically push netconf certs -- Network support.

This commit is contained in:
Adam Ierymenko 2013-10-07 16:13:52 -04:00
parent b4ae1adfbf
commit 4d594b24bc
5 changed files with 125 additions and 30 deletions

View file

@ -51,6 +51,8 @@ std::string CertificateOfMembership::toString() const
{
std::string s;
s.append("1:"); // COM_UINT64_ED25519
uint64_t *buf = new uint64_t[_qualifiers.size() * 3];
try {
unsigned int ptr = 0;
@ -87,6 +89,13 @@ void CertificateOfMembership::fromString(const char *s)
unsigned int colonAt = 0;
while ((s[colonAt])&&(s[colonAt] != ':')) ++colonAt;
if (!((colonAt == 1)&&(s[0] == '1'))) // COM_UINT64_ED25519?
return;
s += colonAt + 1;
colonAt = 0;
while ((s[colonAt])&&(s[colonAt] != ':')) ++colonAt;
if (colonAt) {
unsigned int buflen = colonAt / 2;
char *buf = new char[buflen];