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++;
|
r->Data.KEY.chAlgorithm = *pos++;
|
||||||
|
|
||||||
size = rr->rdata + rr->rdlength - pos;
|
size = rr->rdata + rr->rdlength - pos;
|
||||||
|
r->Data.KEY.wKeyLength = size;
|
||||||
|
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
r->Data.KEY.Key[i] = *pos++;
|
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;
|
r->Data.SIG.wKeyTag = *(const WORD *)pos;
|
||||||
|
|
||||||
size = rr->rdata + rr->rdlength - pos;
|
size = rr->rdata + rr->rdlength - pos;
|
||||||
|
r->Data.SIG.wSignatureLength = size;
|
||||||
|
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
r->Data.SIG.Signature[i] = *pos++;
|
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 ||
|
if (r1->Data.KEY.wFlags != r2->Data.KEY.wFlags ||
|
||||||
r1->Data.KEY.chProtocol != r2->Data.KEY.chProtocol ||
|
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;
|
return FALSE;
|
||||||
if (memcmp( r1->Data.KEY.Key, r2->Data.KEY.Key,
|
if (memcmp( r1->Data.KEY.Key, r2->Data.KEY.Key, r1->Data.KEY.wKeyLength ))
|
||||||
r1->wDataLength - sizeof(DNS_KEY_DATA) + 1 ))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
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.dwOriginalTtl != r2->Data.SIG.dwOriginalTtl ||
|
||||||
r1->Data.SIG.dwExpiration != r2->Data.SIG.dwExpiration ||
|
r1->Data.SIG.dwExpiration != r2->Data.SIG.dwExpiration ||
|
||||||
r1->Data.SIG.dwTimeSigned != r2->Data.SIG.dwTimeSigned ||
|
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;
|
return FALSE;
|
||||||
if (memcmp( r1->Data.SIG.Signature, r2->Data.SIG.Signature,
|
if (memcmp( r1->Data.SIG.Signature, r2->Data.SIG.Signature, r1->Data.SIG.wSignatureLength ))
|
||||||
r1->wDataLength - sizeof(DNS_SIG_DATAA) + 1 ))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,6 +339,8 @@ typedef struct
|
||||||
WORD wFlags;
|
WORD wFlags;
|
||||||
BYTE chProtocol;
|
BYTE chProtocol;
|
||||||
BYTE chAlgorithm;
|
BYTE chAlgorithm;
|
||||||
|
WORD wKeyLength;
|
||||||
|
WORD wPad;
|
||||||
BYTE Key[1];
|
BYTE Key[1];
|
||||||
} DNS_KEY_DATA, *PDNS_KEY_DATA;
|
} DNS_KEY_DATA, *PDNS_KEY_DATA;
|
||||||
|
|
||||||
|
@ -355,7 +357,6 @@ typedef struct
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
PSTR pNameSigner;
|
|
||||||
WORD wTypeCovered;
|
WORD wTypeCovered;
|
||||||
BYTE chAlgorithm;
|
BYTE chAlgorithm;
|
||||||
BYTE chLabelCount;
|
BYTE chLabelCount;
|
||||||
|
@ -363,13 +364,13 @@ typedef struct
|
||||||
DWORD dwExpiration;
|
DWORD dwExpiration;
|
||||||
DWORD dwTimeSigned;
|
DWORD dwTimeSigned;
|
||||||
WORD wKeyTag;
|
WORD wKeyTag;
|
||||||
WORD Pad;
|
WORD wSignatureLength;
|
||||||
|
PSTR pNameSigner;
|
||||||
BYTE Signature[1];
|
BYTE Signature[1];
|
||||||
} DNS_SIG_DATAA, *PDNS_SIG_DATAA;
|
} DNS_SIG_DATAA, *PDNS_SIG_DATAA;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
PWSTR pNameSigner;
|
|
||||||
WORD wTypeCovered;
|
WORD wTypeCovered;
|
||||||
BYTE chAlgorithm;
|
BYTE chAlgorithm;
|
||||||
BYTE chLabelCount;
|
BYTE chLabelCount;
|
||||||
|
@ -377,7 +378,8 @@ typedef struct
|
||||||
DWORD dwExpiration;
|
DWORD dwExpiration;
|
||||||
DWORD dwTimeSigned;
|
DWORD dwTimeSigned;
|
||||||
WORD wKeyTag;
|
WORD wKeyTag;
|
||||||
WORD Pad;
|
WORD wSignatureLength;
|
||||||
|
PWSTR pNameSigner;
|
||||||
BYTE Signature[1];
|
BYTE Signature[1];
|
||||||
} DNS_SIG_DATAW, *PDNS_SIG_DATAW;
|
} DNS_SIG_DATAW, *PDNS_SIG_DATAW;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue