Introduce SIGNATURE_ALG_RSA and KEY_EXCHANGE_ALG_RSA defines and use them

instead of magic values.
This commit is contained in:
Pawel Jakub Dawidek 2012-01-17 17:55:31 +01:00
parent 6f418cb20b
commit 9b07d525fb
2 changed files with 4 additions and 1 deletions

View File

@ -279,7 +279,7 @@ boolean certificate_read_server_proprietary_certificate(rdpCertificate* certific
stream_read_uint32(s, dwSigAlgId);
stream_read_uint32(s, dwKeyAlgId);
if (!(dwSigAlgId == 1 && dwKeyAlgId == 1))
if (!(dwSigAlgId == SIGNATURE_ALG_RSA && dwKeyAlgId == KEY_EXCHANGE_ALG_RSA))
{
printf("certificate_read_server_proprietary_certificate: parse error 1\n");
return false;

View File

@ -36,6 +36,9 @@
#define CERT_PERMANENTLY_ISSUED 0x00000000
#define CERT_TEMPORARILY_ISSUED 0x80000000
#define SIGNATURE_ALG_RSA 0x00000001
#define KEY_EXCHANGE_ALG_RSA 0x00000001
#define BB_RSA_KEY_BLOB 6
#define BB_RSA_SIGNATURE_BLOB 8