richter 2004/02/16 22:39:05
Modified: . Changes.pod epio.c
crypto epcrypto_config.h
test/html crypto.htm
Log:
fixed encryption
Revision Changes Path
1.229 +2 -0 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -r1.228 -r1.229
--- Changes.pod 14 Feb 2004 14:49:54 -0000 1.228
+++ Changes.pod 17 Feb 2004 06:39:05 -0000 1.229
@@ -12,6 +12,8 @@
Reported by Doug Rayner.
- Fixed problem with CGI.pm 3.01+, which deletes uploaded files, when
CGI object is destroyed.
+ - Fixed problem with encrypted source files and Perl 5.8.3 IO layers.
+ Reported by Edwin Ramirez.
=head1 2.0b10 23. Jan 2004
1.26 +12 -2 embperl/epio.c
Index: epio.c
===================================================================
RCS file: /home/cvs/embperl/epio.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- epio.c 23 Jan 2004 06:50:55 -0000 1.25
+++ epio.c 17 Feb 2004 06:39:05 -0000 1.26
@@ -615,6 +615,14 @@
{
int rc ;
char * syntax ;
+ int fileno = PerlIO_fileno (ifd) ;
+ FILE * ifile = fdopen(fileno, "r") ;
+ if (!ifile)
+ {
+ strncpy (r -> errdat1, sInputfile, sizeof (r -> errdat1) - 1) ;
+ strncpy (r -> errdat2, Strerror(errno), sizeof (r -> errdat2) - 1) ;
+ return rcFileOpenErr ;
+ }
#ifndef EP2
syntax = (r -> Component.pTokenTable && strcmp ((char *)r ->
Component.pTokenTable, "Text") == 0)?"Text":"Embperl" ;
@@ -622,7 +630,7 @@
syntax = r -> Component.Config.sSyntax ;
#endif
- if ((rc = do_crypt_file (ifd, NULL, pData, *nFileSize, 0, syntax,
EPC_HEADER)) <= 0)
+ if ((rc = do_crypt_file (ifile, NULL, pData, *nFileSize, 0, syntax,
EPC_HEADER)) <= 0)
{
if (rc < -1 || !EPC_UNENCYRPTED)
{
@@ -635,7 +643,9 @@
}
else
*nFileSize = rc ;
+ fclose (ifile) ;
}
+
#else
if (*nFileSize)
1.9 +2 -2 embperl/crypto/epcrypto_config.h
Index: epcrypto_config.h
===================================================================
RCS file: /home/cvs/embperl/crypto/epcrypto_config.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- epcrypto_config.h 23 Jan 2004 06:50:57 -0000 1.8
+++ epcrypto_config.h 17 Feb 2004 06:39:05 -0000 1.9
@@ -35,7 +35,7 @@
*
* -------------------------------------------------------------------------- */
-#define EPC_ENABLE 0
+#define EPC_ENABLE 1
/* ----------------------------------------------------------------------------
1.3 +6 -1 embperl/test/html/crypto.htm
<<Binary file>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]