Lines Matching refs:pass

1103 static int phar_zip_applysignature(phar_archive_data *phar, struct _phar_zip_pass *pass,  in phar_zip_applysignature()  argument
1116 spprintf(pass->error, 0, "phar error: unable to create temporary file for the signature file"); in phar_zip_applysignature()
1119 tell = php_stream_tell(pass->filefp); in phar_zip_applysignature()
1121 php_stream_seek(pass->filefp, 0, SEEK_SET); in phar_zip_applysignature()
1122 php_stream_copy_to_stream_ex(pass->filefp, newfile, tell, NULL); in phar_zip_applysignature()
1123 tell = php_stream_tell(pass->centralfp); in phar_zip_applysignature()
1124 php_stream_seek(pass->centralfp, 0, SEEK_SET); in phar_zip_applysignature()
1125 php_stream_copy_to_stream_ex(pass->centralfp, newfile, tell, NULL); in phar_zip_applysignature()
1130 if (FAILURE == phar_create_signature(phar, newfile, &signature, &signature_length, pass->error)) { in phar_zip_applysignature()
1131 if (pass->error) { in phar_zip_applysignature()
1132 char *save = *(pass->error); in phar_zip_applysignature()
1133 spprintf(pass->error, 0, "phar error: unable to write signature to zip-based phar: %s", save); in phar_zip_applysignature()
1147 spprintf(pass->error, 0, "phar error: unable to create temporary file for signature"); in phar_zip_applysignature()
1156 if (pass->error) { in phar_zip_applysignature()
1157 …spprintf(pass->error, 0, "phar error: unable to write signature to zip-based phar %s", phar->fname… in phar_zip_applysignature()
1168 phar_zip_changed_apply_int(&entry, (void *)pass); in phar_zip_applysignature()
1171 if (pass->error && *(pass->error)) { in phar_zip_applysignature()
1193 struct _phar_zip_pass pass; in phar_zip_flush() local
1197 pass.error = &temperr; in phar_zip_flush()
1400 pass.old = oldfile; in phar_zip_flush()
1401 pass.filefp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1403 if (!pass.filefp) { in phar_zip_flush()
1414 pass.centralfp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1416 if (!pass.centralfp) { in phar_zip_flush()
1420 pass.free_fp = pass.free_ufp = 1; in phar_zip_flush()
1434 zend_hash_apply_with_argument(&phar->manifest, phar_zip_changed_apply, (void *) &pass); in phar_zip_flush()
1448 php_stream_close(pass.centralfp); in phar_zip_flush()
1453 php_stream_close(pass.filefp); in phar_zip_flush()
1460 if (FAILURE == phar_zip_applysignature(phar, &pass, &main_metadata_str)) { in phar_zip_flush()
1465 cdir_size = php_stream_tell(pass.centralfp); in phar_zip_flush()
1466 cdir_offset = php_stream_tell(pass.filefp); in phar_zip_flush()
1469 php_stream_seek(pass.centralfp, 0, SEEK_SET); in phar_zip_flush()
1473 int ret = php_stream_copy_to_stream_ex(pass.centralfp, pass.filefp, PHP_STREAM_COPY_ALL, &clen); in phar_zip_flush()
1482 php_stream_close(pass.centralfp); in phar_zip_flush()
1488 if (sizeof(eocd) != php_stream_write(pass.filefp, (char *)&eocd, sizeof(eocd))) { in phar_zip_flush()
1495 …if (ZSTR_LEN(main_metadata_str.s) != php_stream_write(pass.filefp, ZSTR_VAL(main_metadata_str.s), … in phar_zip_flush()
1505 if (sizeof(eocd) != php_stream_write(pass.filefp, (char *)&eocd, sizeof(eocd))) { in phar_zip_flush()
1513 if (phar->fp && pass.free_fp) { in phar_zip_flush()
1518 if (pass.free_ufp) { in phar_zip_flush()
1529 phar->fp = pass.filefp; in phar_zip_flush()
1536 phar->fp = pass.filefp; in phar_zip_flush()
1542 php_stream_rewind(pass.filefp); in phar_zip_flush()
1543 php_stream_copy_to_stream_ex(pass.filefp, phar->fp, PHP_STREAM_COPY_ALL, NULL); in phar_zip_flush()
1545 php_stream_close(pass.filefp); in phar_zip_flush()