Lines Matching refs:fp
41 static int phar_call_openssl_signverify(int is_sign, php_stream *fp, zend_off_t end, char *key, int…
109 return entry->fp; in phar_get_efp()
112 if (!entry->fp) { in phar_get_efp()
113 entry->fp = php_stream_open_wrapper(entry->tmp, "rb", STREAM_MUST_SEEK|0, NULL); in phar_get_efp()
115 return entry->fp; in phar_get_efp()
122 php_stream *fp = phar_get_efp(entry, follow_links); in phar_seek_efp() local
125 if (!fp) { in phar_seek_efp()
165 return php_stream_seek(fp, temp, SEEK_SET); in phar_seek_efp()
433 (*ret)->fp = NULL; in phar_get_entry_data()
487 (*ret)->fp = phar_get_efp(entry, 1); in phar_get_entry_data()
556 etemp.fp = php_stream_fopen_tmpfile(); in phar_get_or_create_entry_data()
558 if (!etemp.fp) { in phar_get_or_create_entry_data()
593 php_stream_close(etemp.fp); in phar_get_or_create_entry_data()
603 php_stream_close(etemp.fp); in phar_get_or_create_entry_data()
611 ret->fp = entry->fp; in phar_get_or_create_entry_data()
661 dest->fp = php_stream_fopen_tmpfile(); in phar_copy_entry_fp()
662 if (dest->fp == NULL) { in phar_copy_entry_fp()
673 …if (SUCCESS != php_stream_copy_to_stream_ex(phar_get_efp(link, 0), dest->fp, link->uncompressed_fi… in phar_copy_entry_fp()
674 php_stream_close(dest->fp); in phar_copy_entry_fp()
709 if (!entry->fp) { in phar_open_entry_fp()
710 entry->fp = php_stream_open_wrapper(entry->tmp, "rb", STREAM_MUST_SEEK|0, NULL); in phar_open_entry_fp()
731 dummy.fp = phar_get_pharfp(phar); in phar_open_entry_fp()
749 dummy.fp = phar_get_pharfp(phar); in phar_open_entry_fp()
796 dummy.fp = ufp; in phar_open_entry_fp()
808 php_stream_truncate_set_size(entry->fp, 0); in phar_create_writeable_entry()
834 entry->fp = php_stream_fopen_tmpfile(); in phar_create_writeable_entry()
836 if (!entry->fp) { in phar_create_writeable_entry()
859 php_stream *fp; in phar_separate_entry_fp() local
870 fp = php_stream_fopen_tmpfile(); in phar_separate_entry_fp()
871 if (fp == NULL) { in phar_separate_entry_fp()
882 …if (SUCCESS != php_stream_copy_to_stream_ex(phar_get_efp(link, 0), fp, link->uncompressed_filesize… in phar_separate_entry_fp()
896 entry->fp = fp; in phar_separate_entry_fp()
1388 static int phar_call_openssl_signverify(int is_sign, php_stream *fp, zend_off_t end, char *key, int… in phar_call_openssl_signverify() argument
1398 php_stream_rewind(fp); in phar_call_openssl_signverify()
1399 str = php_stream_copy_to_mem(fp, (size_t) end, 0); in phar_call_openssl_signverify()
1476 int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type, char *sig, int sig… in phar_verify_signature() argument
1482 php_stream_rewind(fp); in phar_verify_signature()
1524 …if (FAILURE == phar_call_openssl_signverify(0, fp, end_of_phar, pubkey ? ZSTR_VAL(pubkey) : NULL, … in phar_verify_signature()
1573 php_stream_seek(fp, 0, SEEK_SET); in phar_verify_signature()
1575 while (read_size && (len = php_stream_read(fp, (char*)buf, read_size)) > 0) { in phar_verify_signature()
1622 while ((len = php_stream_read(fp, (char*)buf, read_size)) > 0) { in phar_verify_signature()
1662 while ((len = php_stream_read(fp, (char*)buf, read_size)) > 0) { in phar_verify_signature()
1710 while ((len = php_stream_read(fp, (char*)buf, read_size)) > 0) { in phar_verify_signature()
1750 while ((len = php_stream_read(fp, (char*)buf, read_size)) > 0) { in phar_verify_signature()
1780 int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signature, int *signature… in phar_create_signature() argument
1785 php_stream_rewind(fp); in phar_create_signature()
1800 while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) { in phar_create_signature()
1815 while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) { in phar_create_signature()
1873 while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) { in phar_create_signature()
1896 php_stream_seek(fp, 0, SEEK_END); in phar_create_signature()
1898 …if (FAILURE == phar_call_openssl_signverify(1, fp, php_stream_tell(fp), PHAR_G(openssl_privatekey)… in phar_create_signature()
1917 while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) { in phar_create_signature()
1932 while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) { in phar_create_signature()