mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-18 20:30:58 +01:00
get rid of strptime
This commit is contained in:
6
INSTALL
6
INSTALL
@@ -1,7 +1,7 @@
|
|||||||
Installation Instructions
|
Installation Instructions
|
||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
|
||||||
Inc.
|
Inc.
|
||||||
|
|
||||||
Copying and distribution of this file, with or without modification,
|
Copying and distribution of this file, with or without modification,
|
||||||
@@ -12,8 +12,8 @@ without warranty of any kind.
|
|||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Briefly, the shell command `./configure && make && make install'
|
Briefly, the shell commands `./configure; make; make install' should
|
||||||
should configure, build, and install this package. The following
|
configure, build, and install this package. The following
|
||||||
more-detailed instructions are generic; see the `README' file for
|
more-detailed instructions are generic; see the `README' file for
|
||||||
instructions specific to this package. Some packages provide this
|
instructions specific to this package. Some packages provide this
|
||||||
`INSTALL' file but do not implement all of the features documented
|
`INSTALL' file but do not implement all of the features documented
|
||||||
|
|||||||
@@ -160,6 +160,9 @@
|
|||||||
*/
|
*/
|
||||||
#undef LT_OBJDIR
|
#undef LT_OBJDIR
|
||||||
|
|
||||||
|
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||||
|
#undef NO_MINUS_C_MINUS_O
|
||||||
|
|
||||||
/* Name of package */
|
/* Name of package */
|
||||||
#undef PACKAGE
|
#undef PACKAGE
|
||||||
|
|
||||||
|
|||||||
@@ -391,12 +391,15 @@ pcp_ks_bundle_t *pcp_import_pub_pbp(PCPCTX *ptx, Buffer *blob) {
|
|||||||
|
|
||||||
date[19] = '\0';
|
date[19] = '\0';
|
||||||
struct tm c;
|
struct tm c;
|
||||||
if(strptime(date, "%Y-%m-%dT%H:%M:%S", &c) == NULL) {
|
c.tm_isdst = -1;
|
||||||
|
if(sscanf(date, "%4d-%2d-%2dT%2d:%2d:%2d", &c.tm_year, &c.tm_mon, &c.tm_mday, &c.tm_hour, &c.tm_min, &c.tm_sec)) {
|
||||||
fatal(ptx, "Failed to parse creation time in PBP public key file\n");
|
fatal(ptx, "Failed to parse creation time in PBP public key file\n");
|
||||||
free(date);
|
free(date);
|
||||||
ucfree(b, sizeof(pbp_pubkey_t));
|
ucfree(b, sizeof(pbp_pubkey_t));
|
||||||
goto errimp2;
|
goto errimp2;
|
||||||
}
|
}
|
||||||
|
c.tm_mon -= 1;
|
||||||
|
c.tm_year -= 1900;
|
||||||
|
|
||||||
buffer_fwd_offset(blob, 46);
|
buffer_fwd_offset(blob, 46);
|
||||||
memcpy(b->name, buffer_get(blob), buffer_left(blob));
|
memcpy(b->name, buffer_get(blob), buffer_left(blob));
|
||||||
|
|||||||
Reference in New Issue
Block a user