aboutsummaryrefslogtreecommitdiff
path: root/lib/base/etpm.h
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2010-04-13 00:16:15 +0200
committerghost <andreas.monzner@multimedia-labs.de>2010-10-06 21:26:53 +0200
commit055c1fb3d42b0be5c00a22a8b9a486d5fb4eff8b (patch)
tree693800788392db1af412bedcc13c9ac677faeea5 /lib/base/etpm.h
parent9a95546733e013704fbdc19de5dc6c4bf3a169b1 (diff)
downloadenigma2-055c1fb3d42b0be5c00a22a8b9a486d5fb4eff8b.tar.gz
enigma2-055c1fb3d42b0be5c00a22a8b9a486d5fb4eff8b.zip
lib/base/etpm.h,cpp: simplify and cleanup code
Diffstat (limited to 'lib/base/etpm.h')
-rw-r--r--lib/base/etpm.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/base/etpm.h b/lib/base/etpm.h
index 3728249b..c9e52140 100644
--- a/lib/base/etpm.h
+++ b/lib/base/etpm.h
@@ -1,16 +1,14 @@
#ifndef __lib_base_etpm_h
#define __lib_base_etpm_h
-#include <lib/base/object.h>
-#include <lib/python/python.h>
-
#ifndef SWIG
#define TPMD_SOCKET "/var/run/tpmd_socket"
#endif
-class eTPM: public Object, public iObject
+#include <string>
+
+class eTPM
{
- DECLARE_REF(eTPM);
#ifndef SWIG
int fd;
unsigned char level2_cert[210];
@@ -26,9 +24,9 @@ class eTPM: public Object, public iObject
TPMD_CMD_APP_CERT = 0x0004,
};
- bool send_cmd(enum tpmd_cmd cmd, const void *data, unsigned int len);
- void *recv_cmd(unsigned int *tag, unsigned int *len);
- void parse_data(const unsigned char *data, unsigned int datalen);
+ bool send_cmd(enum tpmd_cmd cmd, const void *data, size_t len);
+ void *recv_cmd(unsigned int *tag, size_t *len);
+ void parse_data(const unsigned char *data, size_t datalen);
#endif
public:
@@ -39,8 +37,8 @@ public:
TPMD_DT_LEVEL2_CERT = 0x04,
TPMD_DT_LEVEL3_CERT = 0x05
};
- PyObject *getCert(cert_type type);
- PyObject *challenge(PyObject *rnd);
+ std::string getCert(cert_type type);
+ std::string challenge(std::string rnd);
};
#endif // __lib_base_etpm_h