mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-14 00:10:00 -04:00
4675. [cleanup] Don't use C++ keyword class. [RT #45726]
This commit is contained in:
parent
3e2fd1b2e7
commit
f3ed36d3a1
8 changed files with 78 additions and 74 deletions
2
CHANGES
2
CHANGES
|
|
@ -1,3 +1,5 @@
|
|||
4675. [cleanup] Don't use C++ keyword class. [RT #45726]
|
||||
|
||||
4673. [port] Silence GCC 7 warnings. [RT #45592]
|
||||
|
||||
4672. [bug] Fix a regression introduced by change 3938 (when
|
||||
|
|
|
|||
|
|
@ -240,13 +240,13 @@ isc_result_t prove_nx_domain(dns_message_t * msg,
|
|||
dns_rdataset_t ** sigrdataset);
|
||||
isc_result_t prove_nx_type(dns_message_t * msg, dns_name_t *name,
|
||||
dns_rdataset_t *nsec,
|
||||
dns_rdataclass_t class,
|
||||
dns_rdataclass_t rdclass,
|
||||
dns_rdatatype_t type,
|
||||
dns_name_t * rdata_name,
|
||||
dns_rdataset_t ** rdataset,
|
||||
dns_rdataset_t ** sigrdataset);
|
||||
isc_result_t prove_nx(dns_message_t * msg, dns_name_t * name,
|
||||
dns_rdataclass_t class,
|
||||
dns_rdataclass_t rdclass,
|
||||
dns_rdatatype_t type,
|
||||
dns_name_t * rdata_name,
|
||||
dns_rdataset_t ** rdataset,
|
||||
|
|
@ -5804,7 +5804,7 @@ prove_nx_domain(dns_message_t *msg,
|
|||
*/
|
||||
isc_result_t
|
||||
prove_nx_type(dns_message_t *msg, dns_name_t *name, dns_rdataset_t *nsecset,
|
||||
dns_rdataclass_t class, dns_rdatatype_t type,
|
||||
dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
||||
dns_name_t *rdata_name, dns_rdataset_t **rdataset,
|
||||
dns_rdataset_t **sigrdataset)
|
||||
{
|
||||
|
|
@ -5812,7 +5812,7 @@ prove_nx_type(dns_message_t *msg, dns_name_t *name, dns_rdataset_t *nsecset,
|
|||
dns_rdataset_t *signsecset;
|
||||
dns_rdata_t nsec = DNS_RDATA_INIT;
|
||||
|
||||
UNUSED(class);
|
||||
UNUSED(rdclass);
|
||||
|
||||
ret = dns_rdataset_first(nsecset);
|
||||
check_result(ret,"dns_rdataset_first");
|
||||
|
|
@ -5845,7 +5845,7 @@ prove_nx_type(dns_message_t *msg, dns_name_t *name, dns_rdataset_t *nsecset,
|
|||
*
|
||||
*/
|
||||
isc_result_t
|
||||
prove_nx(dns_message_t *msg, dns_name_t *name, dns_rdataclass_t class,
|
||||
prove_nx(dns_message_t *msg, dns_name_t *name, dns_rdataclass_t rdclass,
|
||||
dns_rdatatype_t type, dns_name_t *rdata_name,
|
||||
dns_rdataset_t **rdataset, dns_rdataset_t **sigrdataset)
|
||||
{
|
||||
|
|
@ -5867,7 +5867,7 @@ prove_nx(dns_message_t *msg, dns_name_t *name, dns_rdataclass_t class,
|
|||
DNS_SECTION_AUTHORITY);
|
||||
if (nsecset != NULL) {
|
||||
printf("We have a NSEC for this zone :OK\n");
|
||||
ret = prove_nx_type(msg, name, nsecset, class,
|
||||
ret = prove_nx_type(msg, name, nsecset, rdclass,
|
||||
type, rdata_name, rdataset,
|
||||
sigrdataset);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
#include <tests/t_api.h>
|
||||
|
||||
static isc_result_t
|
||||
t_create(const char *db_type, const char *origin, const char *class,
|
||||
t_create(const char *db_type, const char *origin, const char *classname,
|
||||
const char *model, isc_mem_t *mctx, dns_db_t **db)
|
||||
{
|
||||
int len;
|
||||
|
|
@ -68,8 +68,8 @@ t_create(const char *db_type, const char *origin, const char *class,
|
|||
return(dns_result);
|
||||
}
|
||||
|
||||
DE_CONST(class, region.base);
|
||||
region.length = strlen(class);
|
||||
DE_CONST(classname, region.base);
|
||||
region.length = strlen(classname);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, ®ion);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
|
|
@ -94,7 +94,7 @@ t_dns_db_load(char **av) {
|
|||
char *db_type;
|
||||
char *origin;
|
||||
char *model;
|
||||
char *class;
|
||||
char *db_class;
|
||||
char *expected_load_result;
|
||||
char *findname;
|
||||
char *find_type;
|
||||
|
|
@ -125,7 +125,7 @@ t_dns_db_load(char **av) {
|
|||
db_type = T_ARG(1);
|
||||
origin = T_ARG(2);
|
||||
model = T_ARG(3);
|
||||
class = T_ARG(4);
|
||||
db_class = T_ARG(4);
|
||||
expected_load_result = T_ARG(5);
|
||||
findname = T_ARG(6);
|
||||
find_type = T_ARG(7);
|
||||
|
|
@ -160,7 +160,7 @@ t_dns_db_load(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, model, mctx, &db);
|
||||
dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
|
|
@ -275,7 +275,7 @@ static const char *a2 =
|
|||
"dns_db_iscache(db) returns ISC_TRUE.";
|
||||
|
||||
static int
|
||||
t_dns_db_zc_x(char *filename, char *db_type, char *origin, char *class,
|
||||
t_dns_db_zc_x(char *filename, char *db_type, char *origin, char *db_class,
|
||||
dns_dbtype_t dbtype, isc_boolean_t(*cf)(dns_db_t *),
|
||||
isc_boolean_t exp_result)
|
||||
{
|
||||
|
|
@ -309,8 +309,8 @@ t_dns_db_zc_x(char *filename, char *db_type, char *origin, char *class,
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
textregion.base = db_class;
|
||||
textregion.length = strlen(db_class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
|
|
@ -631,7 +631,7 @@ static int
|
|||
t_dns_db_class(char **av) {
|
||||
|
||||
char *filename;
|
||||
char *class;
|
||||
char *db_class;
|
||||
|
||||
int result;
|
||||
isc_result_t dns_result;
|
||||
|
|
@ -644,16 +644,16 @@ t_dns_db_class(char **av) {
|
|||
isc_textregion_t textregion;
|
||||
|
||||
filename = T_ARG(0);
|
||||
class = T_ARG(1);
|
||||
db_class = T_ARG(1);
|
||||
db = NULL;
|
||||
mctx = NULL;
|
||||
ectx = NULL;
|
||||
|
||||
t_info("testing with database %s and class %s\n",
|
||||
filename, class);
|
||||
filename, db_class);
|
||||
|
||||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
textregion.base = db_class;
|
||||
textregion.length = strlen(db_class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
|
|
@ -685,7 +685,7 @@ t_dns_db_class(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = t_create("rbt", ".", class, "isc_true", mctx, &db);
|
||||
dns_result = t_create("rbt", ".", db_class, "isc_true", mctx, &db);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("t_create failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -714,7 +714,7 @@ t_dns_db_class(char **av) {
|
|||
dns_rdataclass_format(db_rdataclass,
|
||||
classbuf, sizeof(classbuf));
|
||||
t_info("dns_db_class returned %s, expected %s\n",
|
||||
classbuf, class);
|
||||
classbuf, db_class);
|
||||
result = T_FAIL;
|
||||
}
|
||||
|
||||
|
|
@ -744,7 +744,7 @@ t_dns_db_currentversion(char **av) {
|
|||
char *filename;
|
||||
char *db_type;
|
||||
char *origin;
|
||||
char *class;
|
||||
char *db_class;
|
||||
char *model;
|
||||
char *findname;
|
||||
char *findtype;
|
||||
|
|
@ -769,7 +769,7 @@ t_dns_db_currentversion(char **av) {
|
|||
filename = T_ARG(0);
|
||||
db_type = T_ARG(1);
|
||||
origin = T_ARG(2);
|
||||
class = T_ARG(3);
|
||||
db_class = T_ARG(3);
|
||||
model = T_ARG(4);
|
||||
findname = T_ARG(5);
|
||||
findtype = T_ARG(6);
|
||||
|
|
@ -803,7 +803,7 @@ t_dns_db_currentversion(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, model, mctx, &db);
|
||||
dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
|
|
@ -1016,7 +1016,7 @@ t_dns_db_newversion(char **av) {
|
|||
char *filename;
|
||||
char *db_type;
|
||||
char *origin;
|
||||
char *class;
|
||||
char *db_class;
|
||||
char *model;
|
||||
char *newname;
|
||||
char *newtype;
|
||||
|
|
@ -1048,7 +1048,7 @@ t_dns_db_newversion(char **av) {
|
|||
filename = T_ARG(0);
|
||||
db_type = T_ARG(1);
|
||||
origin = T_ARG(2);
|
||||
class = T_ARG(3);
|
||||
db_class = T_ARG(3);
|
||||
model = T_ARG(4);
|
||||
newname = T_ARG(5);
|
||||
newtype = T_ARG(6);
|
||||
|
|
@ -1088,7 +1088,7 @@ t_dns_db_newversion(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, model, mctx, &db);
|
||||
dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
|
|
@ -1160,8 +1160,8 @@ t_dns_db_newversion(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
textregion.base = db_class;
|
||||
textregion.length = strlen(db_class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
|
|
@ -1330,7 +1330,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
char *filename;
|
||||
char *db_type;
|
||||
char *origin;
|
||||
char *class;
|
||||
char *db_class;
|
||||
char *model;
|
||||
char *new_name;
|
||||
char *new_type;
|
||||
|
|
@ -1367,7 +1367,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
filename = T_ARG(0);
|
||||
db_type = T_ARG(1);
|
||||
origin = T_ARG(2);
|
||||
class = T_ARG(3);
|
||||
db_class = T_ARG(3);
|
||||
model = T_ARG(4);
|
||||
new_name = T_ARG(5);
|
||||
new_type = T_ARG(6);
|
||||
|
|
@ -1411,7 +1411,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, model, mctx, &db);
|
||||
dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
|
|
@ -1562,8 +1562,8 @@ t_dns_db_closeversion_1(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
textregion.base = db_class;
|
||||
textregion.length = strlen(db_class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
|
|
@ -1739,7 +1739,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
char *filename;
|
||||
char *db_type;
|
||||
char *origin;
|
||||
char *class;
|
||||
char *db_class;
|
||||
char *model;
|
||||
char *new_name;
|
||||
char *new_type;
|
||||
|
|
@ -1776,7 +1776,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
filename = T_ARG(0);
|
||||
db_type = T_ARG(1);
|
||||
origin = T_ARG(2);
|
||||
class = T_ARG(3);
|
||||
db_class = T_ARG(3);
|
||||
model = T_ARG(4);
|
||||
new_name = T_ARG(5);
|
||||
new_type = T_ARG(6);
|
||||
|
|
@ -1820,7 +1820,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, model, mctx, &db);
|
||||
dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
|
|
@ -1968,8 +1968,8 @@ t_dns_db_closeversion_2(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
textregion.base = db_class;
|
||||
textregion.length = strlen(db_class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
|
|
@ -2210,7 +2210,7 @@ t_dns_db_expirenode(char **av) {
|
|||
char *filename;
|
||||
char *db_type;
|
||||
char *origin;
|
||||
char *class;
|
||||
char *db_class;
|
||||
char *existing_name;
|
||||
char *node_xtime;
|
||||
char *find_xtime;
|
||||
|
|
@ -2236,7 +2236,7 @@ t_dns_db_expirenode(char **av) {
|
|||
filename = T_ARG(0);
|
||||
db_type = T_ARG(1);
|
||||
origin = T_ARG(2);
|
||||
class = T_ARG(3);
|
||||
db_class = T_ARG(3);
|
||||
existing_name = T_ARG(4);
|
||||
node_xtime = T_ARG(5);
|
||||
find_xtime = T_ARG(6);
|
||||
|
|
@ -2294,7 +2294,7 @@ t_dns_db_expirenode(char **av) {
|
|||
}
|
||||
|
||||
db = NULL;
|
||||
dns_result = t_create(db_type, origin, class, "cache", mctx, &db);
|
||||
dns_result = t_create(db_type, origin, db_class, "cache", mctx, &db);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
|
|
@ -2413,7 +2413,7 @@ t_dns_db_findnode_1(char **av) {
|
|||
char *filename;
|
||||
char *db_type;
|
||||
char *origin;
|
||||
char *class;
|
||||
char *db_class;
|
||||
char *model;
|
||||
char *find_name;
|
||||
char *find_type;
|
||||
|
|
@ -2438,7 +2438,7 @@ t_dns_db_findnode_1(char **av) {
|
|||
filename = T_ARG(0);
|
||||
db_type = T_ARG(1);
|
||||
origin = T_ARG(2);
|
||||
class = T_ARG(3);
|
||||
db_class = T_ARG(3);
|
||||
model = T_ARG(4);
|
||||
find_name = T_ARG(5);
|
||||
find_type = T_ARG(6);
|
||||
|
|
@ -2485,7 +2485,7 @@ t_dns_db_findnode_1(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, model, mctx, &db);
|
||||
dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return(T_UNRESOLVED);
|
||||
|
|
@ -2585,7 +2585,7 @@ t_dns_db_findnode_2(char **av) {
|
|||
char *filename;
|
||||
char *db_type;
|
||||
char *origin;
|
||||
char *class;
|
||||
char *db_class;
|
||||
char *model;
|
||||
char *newname;
|
||||
|
||||
|
|
@ -2608,7 +2608,7 @@ t_dns_db_findnode_2(char **av) {
|
|||
filename = T_ARG(0);
|
||||
db_type = T_ARG(1);
|
||||
origin = T_ARG(2);
|
||||
class = T_ARG(3);
|
||||
db_class = T_ARG(3);
|
||||
model = T_ARG(4);
|
||||
newname = T_ARG(5);
|
||||
|
||||
|
|
@ -2640,7 +2640,7 @@ t_dns_db_findnode_2(char **av) {
|
|||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, model, mctx, &db);
|
||||
dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ t1_add_callback(void *arg, dns_name_t *owner, dns_rdataset_t *dataset) {
|
|||
}
|
||||
|
||||
static int
|
||||
test_master(char *testfile, char *origin, char *class, isc_result_t exp_result)
|
||||
test_master(char *testfile, char *origin, char *db_class,
|
||||
isc_result_t exp_result)
|
||||
{
|
||||
int result;
|
||||
int len;
|
||||
|
|
@ -103,8 +104,8 @@ test_master(char *testfile, char *origin, char *class, isc_result_t exp_result)
|
|||
dns_rdatacallbacks_init_stdio(&callbacks);
|
||||
callbacks.add = t1_add_callback;
|
||||
|
||||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
textregion.base = db_class;
|
||||
textregion.length = strlen(db_class);
|
||||
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
|
|
|
|||
|
|
@ -4330,14 +4330,15 @@ same_question(fetchctx_t *fctx) {
|
|||
fctx->res->rdclass != rdataset->rdclass ||
|
||||
!dns_name_equal(&fctx->name, name)) {
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
char class[DNS_RDATACLASS_FORMATSIZE];
|
||||
char type[DNS_RDATATYPE_FORMATSIZE];
|
||||
char classbuf[DNS_RDATACLASS_FORMATSIZE];
|
||||
char typebuf[DNS_RDATATYPE_FORMATSIZE];
|
||||
|
||||
dns_name_format(name, namebuf, sizeof(namebuf));
|
||||
dns_rdataclass_format(rdataset->rdclass, class, sizeof(class));
|
||||
dns_rdatatype_format(rdataset->type, type, sizeof(type));
|
||||
dns_rdataclass_format(rdataset->rdclass, classbuf,
|
||||
sizeof(classbuf));
|
||||
dns_rdatatype_format(rdataset->type, typebuf, sizeof(typebuf));
|
||||
log_formerr(fctx, "question section mismatch: got %s/%s/%s",
|
||||
namebuf, class, type);
|
||||
namebuf, classbuf, typebuf);
|
||||
return (DNS_R_FORMERR);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -250,16 +250,16 @@ der_get_oid(const unsigned char *p, size_t len,
|
|||
oid * data, size_t * size);
|
||||
static int
|
||||
der_get_tag(const unsigned char *p, size_t len,
|
||||
Der_class * class, Der_type * type,
|
||||
Der_class * xclass, Der_type * type,
|
||||
int *tag, size_t * size);
|
||||
|
||||
static int
|
||||
der_match_tag(const unsigned char *p, size_t len,
|
||||
Der_class class, Der_type type,
|
||||
Der_class xclass, Der_type type,
|
||||
int tag, size_t * size);
|
||||
static int
|
||||
der_match_tag_and_length(const unsigned char *p, size_t len,
|
||||
Der_class class, Der_type type, int tag,
|
||||
Der_class xclass, Der_type type, int tag,
|
||||
size_t * length_ret, size_t * size);
|
||||
|
||||
static int
|
||||
|
|
@ -285,7 +285,7 @@ static int
|
|||
der_put_oid(unsigned char *p, size_t len,
|
||||
const oid * data, size_t * size);
|
||||
static int
|
||||
der_put_tag(unsigned char *p, size_t len, Der_class class, Der_type type,
|
||||
der_put_tag(unsigned char *p, size_t len, Der_class xclass, Der_type type,
|
||||
int tag, size_t *);
|
||||
static int
|
||||
der_put_length_and_tag(unsigned char *, size_t, size_t,
|
||||
|
|
@ -909,12 +909,12 @@ der_get_oid(const unsigned char *p, size_t len,
|
|||
|
||||
static int
|
||||
der_get_tag(const unsigned char *p, size_t len,
|
||||
Der_class *class, Der_type *type,
|
||||
Der_class *xclass, Der_type *type,
|
||||
int *tag, size_t *size)
|
||||
{
|
||||
if (len < 1U)
|
||||
return (ASN1_OVERRUN);
|
||||
*class = (Der_class) (((*p) >> 6) & 0x03);
|
||||
*xclass = (Der_class) (((*p) >> 6) & 0x03);
|
||||
*type = (Der_type) (((*p) >> 5) & 0x01);
|
||||
*tag = (*p) & 0x1F;
|
||||
if (size)
|
||||
|
|
@ -924,7 +924,7 @@ der_get_tag(const unsigned char *p, size_t len,
|
|||
|
||||
static int
|
||||
der_match_tag(const unsigned char *p, size_t len,
|
||||
Der_class class, Der_type type,
|
||||
Der_class xclass, Der_type type,
|
||||
int tag, size_t *size)
|
||||
{
|
||||
size_t l;
|
||||
|
|
@ -936,7 +936,7 @@ der_match_tag(const unsigned char *p, size_t len,
|
|||
e = der_get_tag(p, len, &thisclass, &thistype, &thistag, &l);
|
||||
if (e)
|
||||
return (e);
|
||||
if (class != thisclass || type != thistype)
|
||||
if (xclass != thisclass || type != thistype)
|
||||
return (ASN1_BAD_ID);
|
||||
if (tag > thistag)
|
||||
return (ASN1_MISPLACED_FIELD);
|
||||
|
|
@ -949,13 +949,13 @@ der_match_tag(const unsigned char *p, size_t len,
|
|||
|
||||
static int
|
||||
der_match_tag_and_length(const unsigned char *p, size_t len,
|
||||
Der_class class, Der_type type, int tag,
|
||||
Der_class xclass, Der_type type, int tag,
|
||||
size_t *length_ret, size_t *size)
|
||||
{
|
||||
size_t l, ret = 0;
|
||||
int e;
|
||||
|
||||
e = der_match_tag(p, len, class, type, tag, &l);
|
||||
e = der_match_tag(p, len, xclass, type, tag, &l);
|
||||
if (e)
|
||||
return (e);
|
||||
p += l;
|
||||
|
|
@ -1258,19 +1258,19 @@ der_put_oid(unsigned char *p, size_t len,
|
|||
}
|
||||
|
||||
static int
|
||||
der_put_tag(unsigned char *p, size_t len, Der_class class, Der_type type,
|
||||
der_put_tag(unsigned char *p, size_t len, Der_class xclass, Der_type type,
|
||||
int tag, size_t *size)
|
||||
{
|
||||
if (len < 1U)
|
||||
return (ASN1_OVERFLOW);
|
||||
*p = (class << 6) | (type << 5) | tag; /* XXX */
|
||||
*p = (xclass << 6) | (type << 5) | tag; /* XXX */
|
||||
*size = 1;
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
der_put_length_and_tag(unsigned char *p, size_t len, size_t len_val,
|
||||
Der_class class, Der_type type, int tag, size_t *size)
|
||||
Der_class xclass, Der_type type, int tag, size_t *size)
|
||||
{
|
||||
size_t ret = 0;
|
||||
size_t l;
|
||||
|
|
@ -1282,7 +1282,7 @@ der_put_length_and_tag(unsigned char *p, size_t len, size_t len_val,
|
|||
p -= l;
|
||||
len -= l;
|
||||
ret += l;
|
||||
e = der_put_tag(p, len, class, type, tag, &l);
|
||||
e = der_put_tag(p, len, xclass, type, tag, &l);
|
||||
if (e)
|
||||
return (e);
|
||||
p -= l;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ t_main(int argc, char **argv);
|
|||
#endif
|
||||
|
||||
void
|
||||
t_assert(const char *component, int anum, int class, const char *what, ...)
|
||||
t_assert(const char *component, int anum, int tclass, const char *what, ...)
|
||||
ISC_FORMAT_PRINTF(4, 5);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -368,11 +368,11 @@ t_main(int argc, char **argv)
|
|||
}
|
||||
|
||||
void
|
||||
t_assert(const char *component, int anum, int class, const char *what, ...) {
|
||||
t_assert(const char *component, int anum, int tclass, const char *what, ...) {
|
||||
va_list args;
|
||||
char buf[T_BIGBUF];
|
||||
|
||||
(void)printf("T:%s:%d:%s\n", component, anum, class == T_REQUIRED ?
|
||||
(void)printf("T:%s:%d:%s\n", component, anum, tclass == T_REQUIRED ?
|
||||
"A" : "C");
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue