|
@@ -1143,8 +1143,10 @@ int x509_validate_time ( struct x509_certificate *cert, time_t time ) {
|
1143
|
1143
|
* @v first Initial X.509 certificate to fill in, or NULL
|
1144
|
1144
|
* @ret rc Return status code
|
1145
|
1145
|
*/
|
1146
|
|
-int x509_validate_chain ( int ( * parse_next ) ( struct x509_certificate *cert,
|
1147
|
|
- void *context ),
|
|
1146
|
+int x509_validate_chain ( int ( * parse_next )
|
|
1147
|
+ ( struct x509_certificate *cert,
|
|
1148
|
+ const struct x509_certificate *previous,
|
|
1149
|
+ void *context ),
|
1148
|
1150
|
void *context, time_t time, struct x509_root *root,
|
1149
|
1151
|
struct x509_certificate *first ) {
|
1150
|
1152
|
struct x509_certificate temp[2];
|
|
@@ -1159,7 +1161,7 @@ int x509_validate_chain ( int ( * parse_next ) ( struct x509_certificate *cert,
|
1159
|
1161
|
root = &root_certificates;
|
1160
|
1162
|
|
1161
|
1163
|
/* Get first certificate in chain */
|
1162
|
|
- if ( ( rc = parse_next ( current, context ) ) != 0 ) {
|
|
1164
|
+ if ( ( rc = parse_next ( current, NULL, context ) ) != 0 ) {
|
1163
|
1165
|
DBGC ( context, "X509 chain %p could not get first "
|
1164
|
1166
|
"certificate: %s\n", context, strerror ( rc ) );
|
1165
|
1167
|
return rc;
|
|
@@ -1181,7 +1183,7 @@ int x509_validate_chain ( int ( * parse_next ) ( struct x509_certificate *cert,
|
1181
|
1183
|
return 0;
|
1182
|
1184
|
|
1183
|
1185
|
/* Get next certificate in chain */
|
1184
|
|
- if ( ( rc = parse_next ( next, context ) ) != 0 ) {
|
|
1186
|
+ if ( ( rc = parse_next ( next, current, context ) ) != 0 ) {
|
1185
|
1187
|
DBGC ( context, "X509 chain %p could not get next "
|
1186
|
1188
|
"certificate: %s\n", context, strerror ( rc ) );
|
1187
|
1189
|
return rc;
|