mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 14:14:46 +00:00
dnsapi: Fix the DNS_KEY_DATA and DNS_SIG_DATA structure definitions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
da89825f98
commit
0b7dba8c71
|
@ -581,6 +581,7 @@ static DNS_STATUS copy_rdata( ns_msg msg, const ns_rr *rr, DNS_RECORDA *r, WORD
|
|||
r->Data.KEY.chAlgorithm = *pos++;
|
||||
|
||||
size = rr->rdata + rr->rdlength - pos;
|
||||
r->Data.KEY.wKeyLength = size;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
r->Data.KEY.Key[i] = *pos++;
|
||||
|
@ -668,6 +669,7 @@ static DNS_STATUS copy_rdata( ns_msg msg, const ns_rr *rr, DNS_RECORDA *r, WORD
|
|||
r->Data.SIG.wKeyTag = *(const WORD *)pos;
|
||||
|
||||
size = rr->rdata + rr->rdlength - pos;
|
||||
r->Data.SIG.wSignatureLength = size;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
r->Data.SIG.Signature[i] = *pos++;
|
||||
|
|
|
@ -221,10 +221,10 @@ BOOL WINAPI DnsRecordCompare( PDNS_RECORD r1, PDNS_RECORD r2 )
|
|||
{
|
||||
if (r1->Data.KEY.wFlags != r2->Data.KEY.wFlags ||
|
||||
r1->Data.KEY.chProtocol != r2->Data.KEY.chProtocol ||
|
||||
r1->Data.KEY.chAlgorithm != r2->Data.KEY.chAlgorithm)
|
||||
r1->Data.KEY.chAlgorithm != r2->Data.KEY.chAlgorithm ||
|
||||
r1->Data.KEY.wKeyLength != r2->Data.KEY.wKeyLength)
|
||||
return FALSE;
|
||||
if (memcmp( r1->Data.KEY.Key, r2->Data.KEY.Key,
|
||||
r1->wDataLength - sizeof(DNS_KEY_DATA) + 1 ))
|
||||
if (memcmp( r1->Data.KEY.Key, r2->Data.KEY.Key, r1->Data.KEY.wKeyLength ))
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
|
@ -238,10 +238,10 @@ BOOL WINAPI DnsRecordCompare( PDNS_RECORD r1, PDNS_RECORD r2 )
|
|||
r1->Data.SIG.dwOriginalTtl != r2->Data.SIG.dwOriginalTtl ||
|
||||
r1->Data.SIG.dwExpiration != r2->Data.SIG.dwExpiration ||
|
||||
r1->Data.SIG.dwTimeSigned != r2->Data.SIG.dwTimeSigned ||
|
||||
r1->Data.SIG.wKeyTag != r2->Data.SIG.wKeyTag)
|
||||
r1->Data.SIG.wKeyTag != r2->Data.SIG.wKeyTag ||
|
||||
r1->Data.SIG.wSignatureLength != r2->Data.SIG.wSignatureLength)
|
||||
return FALSE;
|
||||
if (memcmp( r1->Data.SIG.Signature, r2->Data.SIG.Signature,
|
||||
r1->wDataLength - sizeof(DNS_SIG_DATAA) + 1 ))
|
||||
if (memcmp( r1->Data.SIG.Signature, r2->Data.SIG.Signature, r1->Data.SIG.wSignatureLength ))
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -339,6 +339,8 @@ typedef struct
|
|||
WORD wFlags;
|
||||
BYTE chProtocol;
|
||||
BYTE chAlgorithm;
|
||||
WORD wKeyLength;
|
||||
WORD wPad;
|
||||
BYTE Key[1];
|
||||
} DNS_KEY_DATA, *PDNS_KEY_DATA;
|
||||
|
||||
|
@ -355,7 +357,6 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
PSTR pNameSigner;
|
||||
WORD wTypeCovered;
|
||||
BYTE chAlgorithm;
|
||||
BYTE chLabelCount;
|
||||
|
@ -363,13 +364,13 @@ typedef struct
|
|||
DWORD dwExpiration;
|
||||
DWORD dwTimeSigned;
|
||||
WORD wKeyTag;
|
||||
WORD Pad;
|
||||
WORD wSignatureLength;
|
||||
PSTR pNameSigner;
|
||||
BYTE Signature[1];
|
||||
} DNS_SIG_DATAA, *PDNS_SIG_DATAA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PWSTR pNameSigner;
|
||||
WORD wTypeCovered;
|
||||
BYTE chAlgorithm;
|
||||
BYTE chLabelCount;
|
||||
|
@ -377,7 +378,8 @@ typedef struct
|
|||
DWORD dwExpiration;
|
||||
DWORD dwTimeSigned;
|
||||
WORD wKeyTag;
|
||||
WORD Pad;
|
||||
WORD wSignatureLength;
|
||||
PWSTR pNameSigner;
|
||||
BYTE Signature[1];
|
||||
} DNS_SIG_DATAW, *PDNS_SIG_DATAW;
|
||||
|
||||
|
|
Loading…
Reference in a new issue