devsri - 2010-10-14

I am trying to evaluate the possibility of using openipmp2 with XBMC as the media center software that would serve as client and play DRM media content.

To begin with, I am trying to understand the code and build the client. Here is the build log:
$ make
g++ -g -Wall -DLINUX -DUNIXSTYLE -DPTHREADS -c -I./include -I/usr/local/ssl/include -I../../ext/xerces/linux/include -I../../ext/squashxml/include -I../../ext/mpeg4ip/lib/SDL/include ./crypto/CryptoManager.cpp
In file included from ./include/crypto/CryptoManager.h:38,
                 from ./crypto/CryptoManager.cpp:20:
../../ext/squashxml/include/squashxml/xml/XMLDocument.h: In static member function ‘static char* XMLDocument::xmlPrefix()’:
../../ext/squashxml/include/squashxml/xml/XMLDocument.h:50: warning: deprecated conversion from string constant to ‘char*’
./crypto/CryptoManager.cpp: In function ‘int OpenIPMP_parse_bag(PKCS12_SAFEBAG*, const char*, int, EVP_PKEY**, X509**, stack_st_X509**, stack_st_ASN1_TYPE**, ASN1_OCTET_STRING**, char*)’:
./crypto/CryptoManager.cpp:601: error: invalid conversion from ‘char* (*)()’ to ‘void* (*)(void**, const unsigned char**, long int)’
./crypto/CryptoManager.cpp:601: error:   initializing argument 2 of ‘void* ASN1_unpack_string(ASN1_STRING*, void* (*)(void**, const unsigned char**, long int))’
./crypto/CryptoManager.cpp:596: warning: unused variable ‘thisLicense’
./crypto/CryptoManager.cpp: In constructor ‘CryptoManager::CryptoManager()’:
./crypto/CryptoManager.cpp:701: warning: deprecated conversion from string constant to ‘char*’
./crypto/CryptoManager.cpp: In member function ‘bool CryptoManager::randomizeKey(unsigned char*, int)’:
./crypto/CryptoManager.cpp:755: warning: unused variable ‘bytes’
./crypto/CryptoManager.cpp: In member function ‘void CryptoManager::generateKey(char*, int)’:
./crypto/CryptoManager.cpp:866: warning: unused variable ‘ret’
./crypto/CryptoManager.cpp: In member function ‘void CryptoManager::dumpEntitlements()’:
./crypto/CryptoManager.cpp:897: warning: deprecated conversion from string constant to ‘char*’
./crypto/CryptoManager.cpp:898: warning: deprecated conversion from string constant to ‘char*’
./crypto/CryptoManager.cpp:911: error: cannot convert ‘stack_st_ASN1_TYPE*’ to ‘const _STACK*’ for argument ‘1’ to ‘int sk_num(const _STACK*)’
./crypto/CryptoManager.cpp:916: error: cannot convert ‘stack_st_ASN1_TYPE*’ to ‘const _STACK*’ for argument ‘1’ to ‘int sk_num(const _STACK*)’
./crypto/CryptoManager.cpp:892: warning: unused variable ‘bag’
./crypto/CryptoManager.cpp:894: warning: unused variable ‘anotherEntitlement’
./crypto/CryptoManager.cpp:895: warning: unused variable ‘current’
./crypto/CryptoManager.cpp:898: warning: unused variable ‘entitlement2’
./crypto/CryptoManager.cpp:899: warning: unused variable ‘buf’
./crypto/CryptoManager.cpp: In member function ‘stack_st_ASN1_TYPE* CryptoManager::createDummyEntitlements()’:
./crypto/CryptoManager.cpp:942: warning: unused variable ‘current’
./crypto/CryptoManager.cpp: In function ‘PKCS12_SAFEBAG* OpenIPMP_PKCS12_pack_safebag(char*, int (*)(), int, int)’:
./crypto/CryptoManager.cpp:982: error: ‘PKCS12_F_PKCS12_PACK_SAFEBAG’ was not declared in this scope
./crypto/CryptoManager.cpp:989: error: invalid conversion from ‘int (*)()’ to ‘int (*)(void*, unsigned char**)’
./crypto/CryptoManager.cpp:989: error:   initializing argument 2 of ‘ASN1_STRING* ASN1_pack_string(void*, int (*)(void*, unsigned char**), ASN1_OCTET_STRING**)’
./crypto/CryptoManager.cpp:991: error: ‘PKCS12_F_PKCS12_PACK_SAFEBAG’ was not declared in this scope
./crypto/CryptoManager.cpp:995: error: ‘PKCS12_F_PKCS12_PACK_SAFEBAG’ was not declared in this scope
./crypto/CryptoManager.cpp: In member function ‘bool CryptoManager::storeP12Instance(UserContext*)’:
./crypto/CryptoManager.cpp:1204: warning: unused variable ‘ret’
./crypto/CryptoManager.cpp:1237: warning: unused variable ‘retcode’
./crypto/CryptoManager.cpp: In member function ‘bool CryptoManager::decodeLicense(XMLDocument*, char*, char**, License**)’:
./crypto/CryptoManager.cpp:1271: warning: deprecated conversion from string constant to ‘char*’
./crypto/CryptoManager.cpp:1280: warning: deprecated conversion from string constant to ‘char*’
./crypto/CryptoManager.cpp: In member function ‘bool CryptoManager::Login(UserContext*)’:
./crypto/CryptoManager.cpp:1303: warning: unused variable ‘p12new’
./crypto/CryptoManager.cpp:1304: warning: unused variable ‘i’
./crypto/CryptoManager.cpp: At global scope:
./crypto/CryptoManager.cpp:101: warning: ‘void irix_locking_callback(int, int, char*, int)’ declared ‘static’ but never defined
./crypto/CryptoManager.cpp:102: warning: ‘void solaris_locking_callback(int, int, char*, int)’ declared ‘static’ but never defined
./crypto/CryptoManager.cpp:103: warning: ‘void win32_locking_callback(int, int, char*, int)’ declared ‘static’ but never defined
./crypto/CryptoManager.cpp:106: warning: ‘long unsigned int irix_thread_id()’ declared ‘static’ but never defined
./crypto/CryptoManager.cpp:107: warning: ‘long unsigned int solaris_thread_id()’ declared ‘static’ but never defined
make: ***  Error 1

My system configuration is:
Fedora 12
g++ (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)

Thanks. I hope I am not working with a beta version of the code.