| | |
| | | #include <licensecc/licensecc.h> |
| | | #include <licensecc_properties.h> |
| | | |
| | | #include "pc_identifier/pc_identifier_facade.hpp" |
| | | #include "limits/license_verifier.hpp" |
| | | #include "base/StringUtils.h" |
| | | #include "LicenseReader.hpp" |
| | | #include "pc-identifiers.h" |
| | | |
| | | using namespace std; |
| | | void print_error(char out_buffer[256], LicenseInfo* licenseInfo) {} |
| | | |
| | | bool identify_pc(IDENTIFICATION_STRATEGY pc_id_method, char* chbuffer, size_t* bufSize) { |
| | | FUNCTION_RETURN result = FUNC_RET_BUFFER_TOO_SMALL; |
| | | if (*bufSize >= sizeof(PcSignature)) { |
| | | PcSignature identifier_out; |
| | | result = generate_user_pc_signature(identifier_out, pc_id_method); |
| | | strncpy(chbuffer, identifier_out, *bufSize); |
| | | string pc_id = license::PcIdentifierFacade::generate_user_pc_signature(pc_id_method); |
| | | if (*bufSize >= pc_id.size() + 1) { |
| | | strncpy(chbuffer, pc_id.c_str(), *bufSize); |
| | | } else { |
| | | *bufSize = sizeof(PcSignature); |
| | | *bufSize = pc_id.size() + 1; |
| | | } |
| | | return result == FUNC_RET_OK; |
| | | } |