FreeRDP
license.h File Reference
#include "rdp.h"
#include <freerdp/crypto/crypto.h>
#include <freerdp/crypto/certificate.h>
#include <freerdp/freerdp.h>
#include <freerdp/log.h>
#include <freerdp/api.h>
#include <winpr/stream.h>
This graph shows which files directly or indirectly include this file:

Data Structures

struct  LICENSE_PRODUCT_INFO
 
struct  LICENSE_BLOB
 
struct  SCOPE_LIST
 
struct  rdpLicense
 

Macros

#define LICENSE_REQUEST   0x01
 
#define PLATFORM_CHALLENGE   0x02
 
#define NEW_LICENSE   0x03
 
#define UPGRADE_LICENSE   0x04
 
#define LICENSE_INFO   0x12
 
#define NEW_LICENSE_REQUEST   0x13
 
#define PLATFORM_CHALLENGE_RESPONSE   0x15
 
#define ERROR_ALERT   0xFF
 
#define LICENSE_PKT_CS_MASK   (LICENSE_INFO | NEW_LICENSE_REQUEST | PLATFORM_CHALLENGE_RESPONSE | ERROR_ALERT)
 
#define LICENSE_PKT_SC_MASK   (LICENSE_REQUEST | PLATFORM_CHALLENGE | NEW_LICENSE | UPGRADE_LICENSE | ERROR_ALERT)
 
#define LICENSE_PKT_MASK   (LICENSE_PKT_CS_MASK | LICENSE_PKT_SC_MASK)
 
#define LICENSE_PREAMBLE_LENGTH   4
 
#define CLIENT_RANDOM_LENGTH   32
 
#define SERVER_RANDOM_LENGTH   32
 
#define MASTER_SECRET_LENGTH   48
 
#define PREMASTER_SECRET_LENGTH   48
 
#define SESSION_KEY_BLOB_LENGTH   48
 
#define MAC_SALT_KEY_LENGTH   16
 
#define LICENSING_ENCRYPTION_KEY_LENGTH   16
 
#define HWID_PLATFORM_ID_LENGTH   4
 
#define HWID_UNIQUE_DATA_LENGTH   16
 
#define HWID_LENGTH   20
 
#define LICENSING_PADDING_SIZE   8
 
#define PREAMBLE_VERSION_2_0   0x02
 
#define PREAMBLE_VERSION_3_0   0x03
 
#define LicenseProtocolVersionMask   0x0F
 
#define EXTENDED_ERROR_MSG_SUPPORTED   0x80
 
#define BB_ANY_BLOB   0x0000
 
#define BB_DATA_BLOB   0x0001
 
#define BB_RANDOM_BLOB   0x0002
 
#define BB_CERTIFICATE_BLOB   0x0003
 
#define BB_ERROR_BLOB   0x0004
 
#define BB_ENCRYPTED_DATA_BLOB   0x0009
 
#define BB_KEY_EXCHG_ALG_BLOB   0x000D
 
#define BB_SCOPE_BLOB   0x000E
 
#define BB_CLIENT_USER_NAME_BLOB   0x000F
 
#define BB_CLIENT_MACHINE_NAME_BLOB   0x0010
 
#define KEY_EXCHANGE_ALG_RSA   0x00000001
 
#define ERR_INVALID_SERVER_CERTIFICATE   0x00000001
 
#define ERR_NO_LICENSE   0x00000002
 
#define ERR_INVALID_MAC   0x00000003
 
#define ERR_INVALID_SCOPE   0x00000004
 
#define ERR_NO_LICENSE_SERVER   0x00000006
 
#define STATUS_VALID_CLIENT   0x00000007
 
#define ERR_INVALID_CLIENT   0x00000008
 
#define ERR_INVALID_PRODUCT_ID   0x0000000B
 
#define ERR_INVALID_MESSAGE_LENGTH   0x0000000C
 
#define ST_TOTAL_ABORT   0x00000001
 
#define ST_NO_TRANSITION   0x00000002
 
#define ST_RESET_PHASE_TO_START   0x00000003
 
#define ST_RESEND_LAST_MESSAGE   0x00000004
 
#define WIN32_PLATFORM_CHALLENGE_TYPE   0x0100
 
#define WIN16_PLATFORM_CHALLENGE_TYPE   0x0200
 
#define WINCE_PLATFORM_CHALLENGE_TYPE   0x0300
 
#define OTHER_PLATFORM_CHALLENGE_TYPE   0xFF00
 
#define LICENSE_DETAIL_SIMPLE   0x0001
 
#define LICENSE_DETAIL_MODERATE   0x0002
 
#define LICENSE_DETAIL_DETAIL   0x0003
 
#define CLIENT_OS_ID_WINNT_351   0x01000000
 
#define CLIENT_OS_ID_WINNT_40   0x02000000
 
#define CLIENT_OS_ID_WINNT_50   0x03000000
 
#define CLIENT_OS_ID_WINNT_POST_52   0x04000000
 
#define CLIENT_IMAGE_ID_MICROSOFT   0x00010000
 
#define CLIENT_IMAGE_ID_CITRIX   0x00020000
 
#define LICENSE_TAG   FREERDP_TAG("core.license")
 
#define DEBUG_LICENSE(...)   do { } while (0)
 

Enumerations

enum  LICENSE_STATE { LICENSE_STATE_AWAIT, LICENSE_STATE_PROCESS, LICENSE_STATE_ABORTED, LICENSE_STATE_COMPLETED }
 

Functions

FREERDP_LOCAL int license_recv (rdpLicense *license, wStream *s)
 
FREERDP_LOCAL BOOL license_send_valid_client_error_packet (rdpLicense *license)
 
FREERDP_LOCAL rdpLicense * license_new (rdpRdp *rdp)
 
FREERDP_LOCAL void license_free (rdpLicense *license)
 

Macro Definition Documentation

#define BB_ANY_BLOB   0x0000
#define BB_CERTIFICATE_BLOB   0x0003
#define BB_CLIENT_MACHINE_NAME_BLOB   0x0010
#define BB_CLIENT_USER_NAME_BLOB   0x000F
#define BB_DATA_BLOB   0x0001
#define BB_ENCRYPTED_DATA_BLOB   0x0009
#define BB_ERROR_BLOB   0x0004
#define BB_KEY_EXCHG_ALG_BLOB   0x000D
#define BB_RANDOM_BLOB   0x0002
#define BB_SCOPE_BLOB   0x000E
#define CLIENT_IMAGE_ID_CITRIX   0x00020000
#define CLIENT_IMAGE_ID_MICROSOFT   0x00010000
#define CLIENT_OS_ID_WINNT_351   0x01000000
#define CLIENT_OS_ID_WINNT_40   0x02000000
#define CLIENT_OS_ID_WINNT_50   0x03000000
#define CLIENT_OS_ID_WINNT_POST_52   0x04000000
#define CLIENT_RANDOM_LENGTH   32
#define DEBUG_LICENSE (   ...)    do { } while (0)
#define ERR_INVALID_CLIENT   0x00000008
#define ERR_INVALID_MAC   0x00000003
#define ERR_INVALID_MESSAGE_LENGTH   0x0000000C
#define ERR_INVALID_PRODUCT_ID   0x0000000B
#define ERR_INVALID_SCOPE   0x00000004
#define ERR_INVALID_SERVER_CERTIFICATE   0x00000001
#define ERR_NO_LICENSE   0x00000002
#define ERR_NO_LICENSE_SERVER   0x00000006
#define ERROR_ALERT   0xFF
#define EXTENDED_ERROR_MSG_SUPPORTED   0x80
#define HWID_LENGTH   20
#define HWID_PLATFORM_ID_LENGTH   4
#define HWID_UNIQUE_DATA_LENGTH   16
#define KEY_EXCHANGE_ALG_RSA   0x00000001
#define LICENSE_DETAIL_DETAIL   0x0003
#define LICENSE_DETAIL_MODERATE   0x0002
#define LICENSE_DETAIL_SIMPLE   0x0001
#define LICENSE_INFO   0x12
#define LICENSE_PKT_CS_MASK   (LICENSE_INFO | NEW_LICENSE_REQUEST | PLATFORM_CHALLENGE_RESPONSE | ERROR_ALERT)
#define LICENSE_PKT_MASK   (LICENSE_PKT_CS_MASK | LICENSE_PKT_SC_MASK)
#define LICENSE_PKT_SC_MASK   (LICENSE_REQUEST | PLATFORM_CHALLENGE | NEW_LICENSE | UPGRADE_LICENSE | ERROR_ALERT)
#define LICENSE_PREAMBLE_LENGTH   4
#define LICENSE_REQUEST   0x01
#define LICENSE_TAG   FREERDP_TAG("core.license")
#define LicenseProtocolVersionMask   0x0F
#define LICENSING_ENCRYPTION_KEY_LENGTH   16
#define LICENSING_PADDING_SIZE   8
#define MAC_SALT_KEY_LENGTH   16
#define MASTER_SECRET_LENGTH   48
#define NEW_LICENSE   0x03
#define NEW_LICENSE_REQUEST   0x13
#define OTHER_PLATFORM_CHALLENGE_TYPE   0xFF00
#define PLATFORM_CHALLENGE   0x02
#define PLATFORM_CHALLENGE_RESPONSE   0x15
#define PREAMBLE_VERSION_2_0   0x02
#define PREAMBLE_VERSION_3_0   0x03
#define PREMASTER_SECRET_LENGTH   48
#define SERVER_RANDOM_LENGTH   32
#define SESSION_KEY_BLOB_LENGTH   48
#define ST_NO_TRANSITION   0x00000002
#define ST_RESEND_LAST_MESSAGE   0x00000004
#define ST_RESET_PHASE_TO_START   0x00000003
#define ST_TOTAL_ABORT   0x00000001
#define STATUS_VALID_CLIENT   0x00000007
#define UPGRADE_LICENSE   0x04
#define WIN16_PLATFORM_CHALLENGE_TYPE   0x0200
#define WIN32_PLATFORM_CHALLENGE_TYPE   0x0100
#define WINCE_PLATFORM_CHALLENGE_TYPE   0x0300

Enumeration Type Documentation

Enumerator
LICENSE_STATE_AWAIT 
LICENSE_STATE_PROCESS 
LICENSE_STATE_ABORTED 
LICENSE_STATE_COMPLETED 

Function Documentation

FREERDP_LOCAL void license_free ( rdpLicense *  license)

Free license module.

Parameters
licenselicense module to be freed

Here is the call graph for this function:

Here is the caller graph for this function:

FREERDP_LOCAL rdpLicense* license_new ( rdpRdp *  rdp)

Instantiate new license module.

Parameters
rdpRDP module
Returns
new license module

Here is the call graph for this function:

Here is the caller graph for this function:

FREERDP_LOCAL int license_recv ( rdpLicense *  license,
wStream *  s 
)

Receive an RDP licensing packet.
http://msdn.microsoft.com/en-us/library/cc240479/

Parameters
licenselicense module
sstream
Returns
if the operation completed successfully

Here is the call graph for this function:

Here is the caller graph for this function:

FREERDP_LOCAL BOOL license_send_valid_client_error_packet ( rdpLicense *  license)

Send Server License Error - Valid Client Packet.
http://msdn.microsoft.com/en-us/library/cc241922/

Parameters
licenselicense module

Here is the call graph for this function:

Here is the caller graph for this function: