2003-05-04 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-keylist.c: Add check for timestamp.
This commit is contained in:
parent
97581ba480
commit
864371b340
@ -1,5 +1,7 @@
|
|||||||
2003-05-04 Marcus Brinkmann <marcus@g10code.de>
|
2003-05-04 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* gpgsm/t-keylist.c: Add check for timestamp.
|
||||||
|
|
||||||
* gpg/Makefile.am (TESTS): Add t-keylist-sig.
|
* gpg/Makefile.am (TESTS): Add t-keylist-sig.
|
||||||
* gpg/t-keylist-sig.c: New file.
|
* gpg/t-keylist-sig.c: New file.
|
||||||
|
|
||||||
|
@ -42,7 +42,8 @@ struct
|
|||||||
{
|
{
|
||||||
char *fpr;
|
char *fpr;
|
||||||
int secret;
|
int secret;
|
||||||
unsigned long expires;
|
long timestamp;
|
||||||
|
long expires;
|
||||||
char *issuer_serial;
|
char *issuer_serial;
|
||||||
char *issuer_name;
|
char *issuer_name;
|
||||||
char *chain_id;
|
char *chain_id;
|
||||||
@ -50,18 +51,18 @@ struct
|
|||||||
}
|
}
|
||||||
keys[] =
|
keys[] =
|
||||||
{
|
{
|
||||||
{ "3CF405464F66ED4A7DF45BBDD1E4282E33BDB76E", 1, 1038908198, "00",
|
{ "3CF405464F66ED4A7DF45BBDD1E4282E33BDB76E", 1, 1007372198, 1038908198, "00",
|
||||||
"CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=D\xc3\xbcsseldorf,C=DE",
|
"CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=D\xc3\xbcsseldorf,C=DE",
|
||||||
NULL,
|
NULL,
|
||||||
"CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=D\xc3\xbcsseldorf,C=DE" },
|
"CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=D\xc3\xbcsseldorf,C=DE" },
|
||||||
{ "DFA56FB5FC41E3A8921F77AD1622EEFD9152A5AD", 0, 1009821790, "01",
|
{ "DFA56FB5FC41E3A8921F77AD1622EEFD9152A5AD", 0, 909684190, 1009821790, "01",
|
||||||
"1.2.840.113549.1.9.1=#63657274696679407063612E64666E2E6465,"
|
"1.2.840.113549.1.9.1=#63657274696679407063612E64666E2E6465,"
|
||||||
"CN=DFN Top Level Certification Authority,OU=DFN-PCA,"
|
"CN=DFN Top Level Certification Authority,OU=DFN-PCA,"
|
||||||
"O=Deutsches Forschungsnetz,C=DE", NULL,
|
"O=Deutsches Forschungsnetz,C=DE", NULL,
|
||||||
"1.2.840.113549.1.9.1=#63657274696679407063612E64666E2E6465,"
|
"1.2.840.113549.1.9.1=#63657274696679407063612E64666E2E6465,"
|
||||||
"CN=DFN Top Level Certification Authority,OU=DFN-PCA,"
|
"CN=DFN Top Level Certification Authority,OU=DFN-PCA,"
|
||||||
"O=Deutsches Forschungsnetz,C=DE" },
|
"O=Deutsches Forschungsnetz,C=DE" },
|
||||||
{ "2C8F3C356AB761CB3674835B792CDA52937F9285", 0, 1009735200, "15",
|
{ "2C8F3C356AB761CB3674835B792CDA52937F9285", 0, 973183644, 1009735200, "15",
|
||||||
"1.2.840.113549.1.9.1=#63657274696679407063612E64666E2E6465,"
|
"1.2.840.113549.1.9.1=#63657274696679407063612E64666E2E6465,"
|
||||||
"CN=DFN Top Level Certification Authority,OU=DFN-PCA,"
|
"CN=DFN Top Level Certification Authority,OU=DFN-PCA,"
|
||||||
"O=Deutsches Forschungsnetz,C=DE",
|
"O=Deutsches Forschungsnetz,C=DE",
|
||||||
@ -267,6 +268,12 @@ main (int argc, char **argv)
|
|||||||
key->subkeys->fpr);
|
key->subkeys->fpr);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
if (key->subkeys->timestamp != keys[i].timestamp)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "Primary key unexpected timestamp: %lu\n",
|
||||||
|
key->subkeys->timestamp);
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
if (key->subkeys->expires != keys[i].expires)
|
if (key->subkeys->expires != keys[i].expires)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Primary key unexpectedly expires: %lu\n",
|
fprintf (stderr, "Primary key unexpectedly expires: %lu\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user