Lines Matching refs:pass

1079 static int phar_zip_applysignature(phar_archive_data *phar, struct _phar_zip_pass *pass,  in phar_zip_applysignature()  argument
1092 spprintf(pass->error, 0, "phar error: unable to create temporary file for the signature file"); in phar_zip_applysignature()
1095 st = tell = php_stream_tell(pass->filefp); in phar_zip_applysignature()
1097 php_stream_seek(pass->filefp, 0, SEEK_SET); in phar_zip_applysignature()
1098 phar_stream_copy_to_stream(pass->filefp, newfile, tell, NULL); in phar_zip_applysignature()
1099 tell = php_stream_tell(pass->centralfp); in phar_zip_applysignature()
1100 php_stream_seek(pass->centralfp, 0, SEEK_SET); in phar_zip_applysignature()
1101 phar_stream_copy_to_stream(pass->centralfp, newfile, tell, NULL); in phar_zip_applysignature()
1106 …if (FAILURE == phar_create_signature(phar, newfile, &signature, &signature_length, pass->error TSR… in phar_zip_applysignature()
1107 if (pass->error) { in phar_zip_applysignature()
1108 char *save = *(pass->error); in phar_zip_applysignature()
1109 spprintf(pass->error, 0, "phar error: unable to write signature to zip-based phar: %s", save); in phar_zip_applysignature()
1123 spprintf(pass->error, 0, "phar error: unable to create temporary file for signature"); in phar_zip_applysignature()
1132 if (pass->error) { in phar_zip_applysignature()
1133 …spprintf(pass->error, 0, "phar error: unable to write signature to zip-based phar %s", phar->fname… in phar_zip_applysignature()
1144 phar_zip_changed_apply((void *)&entry, (void *)pass TSRMLS_CC); in phar_zip_applysignature()
1147 if (pass->error && *(pass->error)) { in phar_zip_applysignature()
1170 struct _phar_zip_pass pass; in phar_zip_flush() local
1174 pass.error = &temperr; in phar_zip_flush()
1363 pass.old = oldfile; in phar_zip_flush()
1364 pass.filefp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1366 if (!pass.filefp) { in phar_zip_flush()
1377 pass.centralfp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1379 if (!pass.centralfp) { in phar_zip_flush()
1383 pass.free_fp = pass.free_ufp = 1; in phar_zip_flush()
1397 zend_hash_apply_with_argument(&phar->manifest, phar_zip_changed_apply, (void *) &pass TSRMLS_CC); in phar_zip_flush()
1411 php_stream_close(pass.centralfp); in phar_zip_flush()
1416 php_stream_close(pass.filefp); in phar_zip_flush()
1423 if (FAILURE == phar_zip_applysignature(phar, &pass, &main_metadata_str TSRMLS_CC)) { in phar_zip_flush()
1428 cdir_size = php_stream_tell(pass.centralfp); in phar_zip_flush()
1429 cdir_offset = php_stream_tell(pass.filefp); in phar_zip_flush()
1432 php_stream_seek(pass.centralfp, 0, SEEK_SET); in phar_zip_flush()
1436 int ret = phar_stream_copy_to_stream(pass.centralfp, pass.filefp, PHP_STREAM_COPY_ALL, &clen); in phar_zip_flush()
1445 php_stream_close(pass.centralfp); in phar_zip_flush()
1451 if (sizeof(eocd) != php_stream_write(pass.filefp, (char *)&eocd, sizeof(eocd))) { in phar_zip_flush()
1458 …if (main_metadata_str.len != php_stream_write(pass.filefp, main_metadata_str.c, main_metadata_str.… in phar_zip_flush()
1468 if (sizeof(eocd) != php_stream_write(pass.filefp, (char *)&eocd, sizeof(eocd))) { in phar_zip_flush()
1476 if (phar->fp && pass.free_fp) { in phar_zip_flush()
1481 if (pass.free_ufp) { in phar_zip_flush()
1492 phar->fp = pass.filefp; in phar_zip_flush()
1499 phar->fp = pass.filefp; in phar_zip_flush()
1505 php_stream_rewind(pass.filefp); in phar_zip_flush()
1506 phar_stream_copy_to_stream(pass.filefp, phar->fp, PHP_STREAM_COPY_ALL, NULL); in phar_zip_flush()
1508 php_stream_close(pass.filefp); in phar_zip_flush()