C++ API changes+fixes:

- context is now a pointer to make sure there's only one all the time
- fixed a couple of double free's
- some minor bug fixes
This commit is contained in:
git@daemon.de
2014-08-01 14:46:38 +02:00
parent 1e4e65b811
commit e6a5c51d8a
13 changed files with 168 additions and 114 deletions

View File

@@ -43,15 +43,15 @@ namespace pcp {
PubKey P;
Key S;
Vault vault;
PubKey Signedby;
PubKey *Signedby;
Buf sig;
PcpContext PTX;
PcpContext *PTX;
// constructors
Signature(PcpContext &P, Key &skey); // sign only
Signature(PcpContext &P,PubKey &pkey); // verify only
Signature(PcpContext &P,Key &skey, PubKey &pkey); // both/bulk
Signature(PcpContext &P,Vault &v);
Signature(PcpContext *P, Key &skey); // sign only
Signature(PcpContext *P,PubKey &pkey); // verify only
Signature(PcpContext *P,Key &skey, PubKey &pkey); // both/bulk
Signature(PcpContext *P,Vault &v);
// destructor
~Signature();
@@ -65,7 +65,8 @@ namespace pcp {
// verify using P or use vault if defined
bool verify(std::vector<unsigned char> message);
bool verify(unsigned char *signature, size_t mlen);
bool verify(Buf _sig);
bool verify(Buf &_sig);
// FIXME: return Signedby
};
};