[oi-dev] Changes from SFW b149 > b148
Sevan / Venture37
venture37 at gmail.com
Thu Sep 30 01:04:42 UTC 2010
Sorry about the noise, in a rush to get out of the office I posted an
incomplete diff earlier.
Sevan
-------------- next part --------------
diff -r 6135d8b0a676 usr/src/cmd/ImageMagick/Makefile.sfw
--- a/usr/src/cmd/ImageMagick/Makefile.sfw Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/cmd/ImageMagick/Makefile.sfw Thu Sep 30 01:30:20 2010 +0100
@@ -21,7 +21,7 @@
#
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
#
-#ident "@(#)Makefile.sfw 1.17 10/07/21 SMI"
+#ident "@(#)Makefile.sfw 1.18 10/09/03 SMI"
VER=ImageMagick-6.3.4
VER64=$(VER)-64
@@ -145,19 +145,22 @@
#
# Patches:
# 1. la.patch - So it uses .so files instead of .la files
+# 2. png.patch - to cope with the latest libpng
#
$(VER)/configure: $(VER)$(VERS).tar.bz2
/usr/bin/bzip2 -dc $(VER)$(VERS).tar.bz2 | /usr/bin/tar oxpf -
/usr/bin/gpatch -p0 < la.patch
+ /usr/bin/gpatch -p0 < png.patch
touch $(VER)/configure
$(VER64)/configure: $(VER)$(VERS).tar.bz2
-$(RM) -r tmp ; mkdir tmp
(cd tmp ; \
/usr/bin/bzip2 -dc ../$(VER)$(VERS).tar.bz2 | /usr/bin/tar oxpf - ; \
- /usr/bin/gpatch -p0 < ../la.patch)
- -$(RM) -r $(VER64) ; mv tmp/$(VER) $(VER64)
+ /usr/bin/gpatch -p0 < ../la.patch ; \
+ /usr/bin/gpatch -p0 < ../png.patch)
+ -$(RM) -r $(VER64) ; mv tmp/$(VER) $(VER64) ; rmdir tmp
touch $(VER64)/configure
clean:
diff -r 6135d8b0a676 usr/src/cmd/ImageMagick/png.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/ImageMagick/png.patch Thu Sep 30 01:30:20 2010 +0100
@@ -0,0 +1,13 @@
+--- ImageMagick-6.3.4/coders/png.c.orig Mon Aug 23 12:50:12 2010
++++ ImageMagick-6.3.4/coders/png.c Mon Aug 23 12:51:35 2010
+@@ -76,6 +76,10 @@
+ #if defined(HasPNG)
+ #include "png.h"
+ #include "zlib.h"
++#if PNG_LIBPNG_VER >= 10400
++#define trans_values trans_color
++#define trans trans_alpha
++#endif
+
+ /* ImageMagick differences */
+ #define first_scene scene
diff -r 6135d8b0a676 usr/src/cmd/Makefile
--- a/usr/src/cmd/Makefile Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/cmd/Makefile Thu Sep 30 01:30:20 2010 +0100
@@ -22,7 +22,7 @@
#
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
#
-# ident "@(#)Makefile 1.191 10/07/09 SMI"
+# ident "@(#)Makefile 1.192 10/08/31 SMI"
#
#
@@ -259,7 +259,7 @@
php5: apache2 mysql-5-1
simplewbem: cimserver
konkretcmpi: cimserver
-lighttpd14: mysql-5-1
+lighttpd14: lua mysql-5-1
guile: libtool
autogen: guile
net-snmp: doxygen
diff -r 6135d8b0a676 usr/src/cmd/apache/Makefile.sfw
--- a/usr/src/cmd/apache/Makefile.sfw Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/cmd/apache/Makefile.sfw Thu Sep 30 01:30:20 2010 +0100
@@ -19,10 +19,9 @@
#
# CDDL HEADER END
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
#
-#ident "@(#)Makefile.sfw 1.36 10/01/14 SMI"
+#ident "@(#)Makefile.sfw 1.37 10/09/03 SMI"
# Note to maintainers. I'm sorry...please forgive me for all
# that follows.
@@ -176,6 +175,7 @@
gzip -dc $(SERVER).tar.gz | tar xopf -
(cd $(SERVER); gpatch -p1 < ../Solaris/manpage.patches)
(cd $(SERVER); gpatch -p1 < ../Solaris/apachectl.patch) # PSARC/2001/244
+ (cd $(SERVER); gpatch -p1 < ../Solaris/getline.patches)
# remove nasty chown
rm -f $(SERVER)/Makefile.tmpl.orig
mv $(SERVER)/Makefile.tmpl \
diff -r 6135d8b0a676 usr/src/cmd/apache/Solaris/getline.patches
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/apache/Solaris/getline.patches Thu Sep 30 01:30:20 2010 +0100
@@ -0,0 +1,142 @@
+*** apache_1.3.41/src/support/htpasswd.c.orig Thu Sep 2 11:04:04 2010
+--- apache_1.3.41/src/support/htpasswd.c Thu Sep 2 11:04:15 2010
+***************
+*** 98,104 ****
+ * Get a line of input from the user, not including any terminating
+ * newline.
+ */
+! static int getline(char *s, int n, FILE *f)
+ {
+ register int i = 0;
+
+--- 98,104 ----
+ * Get a line of input from the user, not including any terminating
+ * newline.
+ */
+! static int my_getline(char *s, int n, FILE *f)
+ {
+ register int i = 0;
+
+***************
+*** 547,553 ****
+ char scratch[MAX_STRING_LEN];
+
+ fpw = fopen(pwfilename, "r");
+! while (! (getline(line, sizeof(line), fpw))) {
+ char *colon;
+
+ if ((line[0] == '#') || (line[0] == '\0')) {
+--- 547,553 ----
+ char scratch[MAX_STRING_LEN];
+
+ fpw = fopen(pwfilename, "r");
+! while (! (my_getline(line, sizeof(line), fpw))) {
+ char *colon;
+
+ if ((line[0] == '#') || (line[0] == '\0')) {
+*** apache_1.3.41/src/support/htdigest.c.orig Thu Sep 2 11:06:24 2010
+--- apache_1.3.41/src/support/htdigest.c Thu Sep 2 11:06:37 2010
+***************
+*** 71,77 ****
+ while ((line[y++] = line[x++]));
+ }
+
+! static int getline(char *s, int n, FILE *f)
+ {
+ register int i = 0;
+
+--- 71,77 ----
+ while ((line[y++] = line[x++]));
+ }
+
+! static int my_getline(char *s, int n, FILE *f)
+ {
+ register int i = 0;
+
+***************
+*** 158,164 ****
+ {
+ static char line[MAX_STRING_LEN];
+
+! while (!(getline(line, MAX_STRING_LEN, source))) {
+ putline(target, line);
+ }
+ }
+--- 158,164 ----
+ {
+ static char line[MAX_STRING_LEN];
+
+! while (!(my_getline(line, MAX_STRING_LEN, source))) {
+ putline(target, line);
+ }
+ }
+***************
+*** 216,222 ****
+ ap_cpystrn(realm, argv[2], sizeof(realm));
+
+ found = 0;
+! while (!(getline(line, MAX_STRING_LEN, f))) {
+ if (found || (line[0] == '#') || (!line[0])) {
+ putline(tfp, line);
+ continue;
+--- 216,222 ----
+ ap_cpystrn(realm, argv[2], sizeof(realm));
+
+ found = 0;
+! while (!(my_getline(line, MAX_STRING_LEN, f))) {
+ if (found || (line[0] == '#') || (!line[0])) {
+ putline(tfp, line);
+ continue;
+*** apache_1.3.41/src/support/logresolve.c.orig Thu Sep 2 11:07:36 2010
+--- apache_1.3.41/src/support/logresolve.c Thu Sep 2 11:08:07 2010
+***************
+*** 71,77 ****
+ #endif /* !MPE && !WIN32*/
+
+ static void cgethost(struct in_addr ipnum, char *string, int check);
+! static int getline(char *s, int n);
+ static void stats(FILE *output);
+
+
+--- 71,77 ----
+ #endif /* !MPE && !WIN32*/
+
+ static void cgethost(struct in_addr ipnum, char *string, int check);
+! static int my_getline(char *s, int n);
+ static void stats(FILE *output);
+
+
+***************
+*** 278,284 ****
+ * gets a line from stdin
+ */
+
+! static int getline (char *s, int n)
+ {
+ char *cp;
+
+--- 278,284 ----
+ * gets a line from stdin
+ */
+
+! static int my_getline (char *s, int n)
+ {
+ char *cp;
+
+***************
+*** 326,332 ****
+ for (i = 0; i < MAX_ERR + 2; i++)
+ errors[i] = 0;
+
+! while (getline(line, MAXLINE)) {
+ if (line[0] == '\0')
+ continue;
+ entries++;
+--- 326,332 ----
+ for (i = 0; i < MAX_ERR + 2; i++)
+ errors[i] = 0;
+
+! while (my_getline(line, MAXLINE)) {
+ if (line[0] == '\0')
+ continue;
+ entries++;
diff -r 6135d8b0a676 usr/src/cmd/gdb/Makefile.sfw
--- a/usr/src/cmd/gdb/Makefile.sfw Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/cmd/gdb/Makefile.sfw Thu Sep 30 01:30:20 2010 +0100
@@ -20,12 +20,11 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
#
-#ident "@(#)Makefile.sfw 1.12 09/10/07 SMI"
+#ident "@(#)Makefile.sfw 1.13 10/09/09 SMI"
#
include ../Makefile.cmd
@@ -97,7 +96,8 @@
touch $(VER)/configure
(cd $(VER); \
gpatch -p1 < ../gdb.solib-svr4.patch; \
- gpatch -p1 < ../gdb.auxv.patch)
+ gpatch -p1 < ../gdb.auxv.c.patch; \
+ gpatch -p1 < ../gdb.fork-child.c.patch)
$(VER64)/configure: $(TARBALL)
rm -rf tmp; mkdir tmp
@@ -106,7 +106,8 @@
touch $(VER64)/configure
(cd $(VER64); \
gpatch -p1 < ../gdb.solib-svr4.patch; \
- gpatch -p1 < ../gdb.auxv.patch)
+ gpatch -p1 < ../gdb.auxv.c.patch; \
+ gpatch -p1 < ../gdb.fork-child.c.patch)
clean:
-rm -rf $(VER) $(VER64)
diff -r 6135d8b0a676 usr/src/cmd/gdb/gdb.auxv.c.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/gdb/gdb.auxv.c.patch Thu Sep 30 01:30:20 2010 +0100
@@ -0,0 +1,41 @@
+--- gdb-6.8.orig/gdb/auxv.c Wed Jan 16 08:27:37 2008
++++ gdb-6.8-64/gdb/auxv.c Tue Aug 31 14:41:16 2010
+@@ -82,7 +82,15 @@
+ target_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
+ gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
+ {
+- const int sizeof_auxv_field = TYPE_LENGTH (builtin_type_void_data_ptr);
++
++ /*
++ * Solaris pads out the auxv for 32 bit process to 64 bits when
++ * being read by a 64 bit process. Use the native pointer size
++ * in gdb itself to determine the auxv field size.
++ *
++ * const int sizeof_auxv_field = TYPE_LENGTH (builtin_type_void_data_ptr);
++ */
++ const int sizeof_auxv_field = sizeof (void *);
+ gdb_byte *ptr = *readptr;
+
+ if (endptr == ptr)
+@@ -91,7 +99,20 @@
+ if (endptr - ptr < sizeof_auxv_field * 2)
+ return -1;
+
+- *typep = extract_unsigned_integer (ptr, sizeof_auxv_field);
++ if (sizeof_auxv_field == 8 && gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG) {
++ /*
++ * On 64 bit Solaris SPARC, i.e. big endian, the type will be in
++ * the left 4 bytes for 32 bit processes and the right 4 bytes
++ * for 64 bit processes. The padding is 0.
++ */
++ *typep = extract_unsigned_integer (ptr, 4);
++ if (*typep == 0) *typep = extract_unsigned_integer (ptr + 4, 4);
++ } else {
++ /*
++ * Nothing special needs to be done on 32 bit or little endian systems.
++ */
++ *typep = extract_unsigned_integer (ptr, sizeof_auxv_field);
++ }
+ ptr += sizeof_auxv_field;
+ *valp = extract_unsigned_integer (ptr, sizeof_auxv_field);
+ ptr += sizeof_auxv_field;
diff -r 6135d8b0a676 usr/src/cmd/gdb/gdb.auxv.patch
--- a/usr/src/cmd/gdb/gdb.auxv.patch Fri Sep 03 00:29:14 2010 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
---- gdb-6.8/gdb/auxv.c.orig Sun Aug 2 13:51:23 2009
-+++ gdb-6.8/gdb/auxv.c Sun Aug 2 13:51:46 2009
-@@ -52,9 +52,21 @@
- int fd;
- LONGEST n;
-
-+ /*
-+ * Solaris pads auxv for 32 bit process out to 64 bits when being read
-+ * by a 64 bit process. gdb expects a 32 bit auxv for 32 bit processes.
-+ * We'll remove the padding here.
-+ */
-+ int solaris_64_32 = TYPE_LENGTH (builtin_type_void_data_ptr) == 4 && sizeof (void *) == 8;
-+
- gdb_assert (object == TARGET_OBJECT_AUXV);
- gdb_assert (readbuf || writebuf);
-
-+ /*
-+ * Adjust offest for the 64/32 case.
-+ */
-+ if (solaris_64_32) offset *= 2;
-+
- pathname = xstrprintf ("/proc/%d/auxv", PIDGET (inferior_ptid));
- fd = open (pathname, writebuf != NULL ? O_WRONLY : O_RDONLY);
- xfree (pathname);
-@@ -64,10 +76,54 @@
- if (offset != (ULONGEST) 0
- && lseek (fd, (off_t) offset, SEEK_SET) != (off_t) offset)
- n = -1;
-- else if (readbuf != NULL)
-+ else if (readbuf != NULL) {
- n = read (fd, readbuf, len);
-- else
-+ /*
-+ * Remove the padding for the 64/32 case.
-+ */
-+ if (solaris_64_32) {
-+ /*
-+ * Solaris pads auxv for 32 bit process out to 64 bits when being read
-+ * by a 64 bit process. gdb expects a 32 bit auxv for 32 bit processes.
-+ */
-+ unsigned *from, *to;
-+ gdb_assert (n % 4 == 0);
-+ from = to = (unsigned *)readbuf;
-+ while (from < (unsigned *)(readbuf + n)) {
-+ /*
-+ * The type is always in the first 4 bytes followed by 4 bytes
-+ * of padding on both SPARC and x86.
-+ */
-+ *to++ = *from;
-+ from += 2;
-+ /*
-+ * The value is before the padding on Intel and after on SPARC.
-+ */
-+ switch (gdbarch_byte_order (current_gdbarch)) {
-+ case BFD_ENDIAN_LITTLE:
-+ *to++ = *from;
-+ gdb_assert (*(from + 1) == 0);
-+ break;
-+ case BFD_ENDIAN_BIG:
-+ gdb_assert (*from == 0);
-+ *to++ = *(from + 1);
-+ break;
-+ default: gdb_assert (0);
-+ }
-+ from += 2;
-+ }
-+ /*
-+ * Adjust the length for the 64/32 case.
-+ */
-+ n /= 2;
-+ }
-+ } else {
-+ /*
-+ * Does gdb ever write to auxv?
-+ */
-+ gdb_assert (!writebuf);
- n = write (fd, writebuf, len);
-+ }
-
- (void) close (fd);
-
diff -r 6135d8b0a676 usr/src/cmd/gdb/gdb.fork-child.c.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/gdb/gdb.fork-child.c.patch Thu Sep 30 01:30:20 2010 +0100
@@ -0,0 +1,74 @@
+--- gdb-6.8.orig/gdb/fork-child.c Tue Jan 29 13:11:24 2008
++++ gdb-6.8-64/gdb/fork-child.c Fri Sep 3 15:08:51 2010
+@@ -40,6 +40,16 @@
+
+ extern char **environ;
+
++/* On Solaris, the SHELL may be a hard link to /usr/lib/isaexec.
++ If so, there will be one more exec trap to skip while starting
++ the inferior. */
++
++#include <fcntl.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++
++static int isaexec_shell;
++
+ /* Break up SCRATCH into an argument vector suitable for passing to
+ execvp and store it in ARGV. E.g., on "run a b c d" this routine
+ would get as input the string "a b c d", and as output it would
+@@ -136,6 +146,8 @@
+ static char **argv;
+ const char *inferior_io_terminal = get_inferior_io_terminal ();
+
++ isaexec_shell = 0; /* Solaris only */
++
+ /* If no exec file handed to us, get it from the exec-file command
+ -- with a good, common error message if none is specified. */
+ exec_file = exec_file_arg;
+@@ -148,6 +160,9 @@
+ shell_file = shell_file_arg;
+ if (STARTUP_WITH_SHELL)
+ {
++ /* Solaris only, is the shell a hard link to isaexec? */
++ struct stat buf1, buf2;
++
+ /* Figure out what shell to start up the user program under. */
+ if (shell_file == NULL)
+ shell_file = getenv ("SHELL");
+@@ -154,6 +169,25 @@
+ if (shell_file == NULL)
+ shell_file = default_shell_file;
+ shell = 1;
++
++ /* Solaris only, is the shell a hard link to isaexec?
++ If either stat call fails or the user's shell is
++ not linked to isaexec, proceed with gdb's normal
++ behavior, i.e. do not skip an extra exec.
++
++ Assume that two files are the same if their inode
++ numbers, device numbers, and number of links match.
++ Is it possible to get a false positive if the shell
++ and isaexec are located on different file systems? */
++ if (
++ stat ("/usr/lib/isaexec", &buf1) == 0 &&
++ stat (shell_file, &buf2) == 0 &&
++ buf1.st_ino == buf2.st_ino &&
++ buf1.st_dev == buf2.st_dev &&
++ buf1.st_nlink == buf2.st_nlink
++ ) {
++ isaexec_shell = 1;
++ }
+ }
+
+ /* Multiplying the length of exec_file by 4 is to account for the
+@@ -395,6 +429,9 @@
+ int pending_execs = ntraps;
+ int terminal_initted = 0;
+
++ /* Solaris only, increment ntraps if shell is isaexec'ed. */
++ pending_execs += isaexec_shell;
++
+ /* The process was started by the fork that created it, but it will
+ have stopped one instruction after execing the shell. Here we
+ must get it up to actual execution of the real program. */
diff -r 6135d8b0a676 usr/src/cmd/httping/Makefile.sfw
--- a/usr/src/cmd/httping/Makefile.sfw Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/cmd/httping/Makefile.sfw Thu Sep 30 01:30:20 2010 +0100
@@ -23,7 +23,7 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "@(#)Makefile.sfw 1.1 09/04/14 SMI"
+# ident "@(#)Makefile.sfw 1.2 10/09/03 SMI"
#
VER=$(COMPONENT_VERSION:sh)
@@ -37,7 +37,7 @@
CC=$(CC) \
PATH=$(SFW_PATH) \
"LDFLAGS=$(LDFLAGS) -lsocket -lnsl -lssl -lcrypto" \
- "CFLAGS=$(CFLAGS) -DVERSION=\\\"$(VER)\\\"" \
+ "CFLAGS=$(CFLAGS) -Dstrndup=strndup -DVERSION=\\\"$(VER)\\\"" \
MAKE=$(CCSMAKE) \
$(CCSMAKE) -e all)
diff -r 6135d8b0a676 usr/src/cmd/lighttpd14/Makefile.sfw
--- a/usr/src/cmd/lighttpd14/Makefile.sfw Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/cmd/lighttpd14/Makefile.sfw Thu Sep 30 01:30:20 2010 +0100
@@ -20,10 +20,9 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
-# ident "@(#)Makefile.sfw 1.5 09/11/19 SMI"
+# ident "@(#)Makefile.sfw 1.6 10/08/31 SMI"
#
VER=$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
@@ -69,8 +68,8 @@
MAKE=$(CCSMAKE) \
PCRECONFIG=/usr/bin/pcre-config \
INSTALL=$(GINSTALL) \
- LUA_LIBS=/usr/lib \
- LUA_CFLAGS=-I/usr/include \
+ LUA_LIBS=$(ROOT)/usr/lib \
+ LUA_CFLAGS=-I$(ROOT)/usr/include \
./configure --prefix=$(LIGHTTPD_INSTALLDIR) \
--mandir=$(LIGHTTPD_INSTALLDIR)/man \
--with-pic \
diff -r 6135d8b0a676 usr/src/cmd/lighttpd14/Patches/lighttpd_fix_slow_request_dos.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/lighttpd14/Patches/lighttpd_fix_slow_request_dos.patch Thu Sep 30 01:30:20 2010 +0100
@@ -0,0 +1,209 @@
+diff -u -r lighttpd-1.4.23-orig/src/base.h lighttpd-1.4.23/src/base.h
+--- src/base.h Thu Jun 11 02:44:17 2009
++++ src/base.h Tue Aug 24 04:16:29 2010
+@@ -421,7 +421,6 @@
+
+ #ifdef USE_OPENSSL
+ SSL *ssl;
+- buffer *ssl_error_want_reuse_buffer;
+ #endif
+ /* etag handling */
+ etag_flags_t etag_flags;
+Only in lighttpd-1.4.23/src: base.h.orig
+diff -u -r lighttpd-1.4.23-orig/src/chunk.c lighttpd-1.4.23/src/chunk.c
+--- src/chunk.c Mon Mar 30 15:16:59 2009
++++ src/chunk.c Tue Aug 24 04:12:50 2010
+@@ -197,8 +197,6 @@
+ int chunkqueue_append_buffer_weak(chunkqueue *cq, buffer *mem) {
+ chunk *c;
+
+- if (mem->used == 0) return 0;
+-
+ c = chunkqueue_get_unused_chunk(cq);
+ c->type = MEM_CHUNK;
+ c->offset = 0;
+diff -u -r lighttpd-1.4.23-orig/src/connections.c lighttpd-1.4.23/src/connections.c
+--- src/connections.c Thu Jun 11 06:54:30 2009
++++ src/connections.c Tue Aug 24 04:12:50 2010
+@@ -192,40 +192,42 @@
+
+ static int connection_handle_read_ssl(server *srv, connection *con) {
+ #ifdef USE_OPENSSL
+- int r, ssl_err, len, count = 0;
++ int r, ssl_err, len, count = 0, read_offset, toread;
+ buffer *b = NULL;
+
+ if (!con->conf.is_ssl) return -1;
+
+- /* don't resize the buffer if we were in SSL_ERROR_WANT_* */
+-
+ ERR_clear_error();
+ do {
+- if (!con->ssl_error_want_reuse_buffer) {
+- b = buffer_init();
+- buffer_prepare_copy(b, SSL_pending(con->ssl) + (16 * 1024)); /* the pending bytes + 16kb */
++ if (NULL != con->read_queue->last) {
++ b = con->read_queue->last->mem;
++ }
+
++ if (NULL == b || b->size - b->used < 1024) {
++ b = chunkqueue_get_append_buffer(con->read_queue);
++ len = SSL_pending(con->ssl);
++ if (len < 4*1024) len = 4*1024; /* always alloc >= 4k buffer */
++ buffer_prepare_copy(b, len + 1);
++
+ /* overwrite everything with 0 */
+ memset(b->ptr, 0, b->size);
+- } else {
+- b = con->ssl_error_want_reuse_buffer;
+ }
+
+- len = SSL_read(con->ssl, b->ptr, b->size - 1);
+- con->ssl_error_want_reuse_buffer = NULL; /* reuse it only once */
++ read_offset = (b->used > 0) ? b->used - 1 : 0;
++ toread = b->size - 1 - read_offset;
+
++ len = SSL_read(con->ssl, b->ptr + read_offset, toread);
++
+ if (len > 0) {
+- b->used = len;
++ if (b->used > 0) b->used--;
++ b->used += len;
+ b->ptr[b->used++] = '\0';
+
+- /* we move the buffer to the chunk-queue, no need to free it */
++ con->bytes_read += len;
+
+- chunkqueue_append_buffer_weak(con->read_queue, b);
+ count += len;
+- con->bytes_read += len;
+- b = NULL;
+ }
+- } while (len > 0 && count < MAX_READ_LIMIT);
++ } while (len == toread && count < MAX_READ_LIMIT);
+
+
+ if (len < 0) {
+@@ -234,11 +236,11 @@
+ case SSL_ERROR_WANT_READ:
+ case SSL_ERROR_WANT_WRITE:
+ con->is_readable = 0;
+- con->ssl_error_want_reuse_buffer = b;
+
+- b = NULL;
++ /* the manual says we have to call SSL_read with the same arguments next time.
++ * we ignore this restriction; no one has complained about it in 1.5 yet, so it probably works anyway.
++ */
+
+- /* we have to steal the buffer from the queue-queue */
+ return 0;
+ case SSL_ERROR_SYSCALL:
+ /**
+@@ -297,16 +299,11 @@
+
+ connection_set_state(srv, con, CON_STATE_ERROR);
+
+- buffer_free(b);
+-
+ return -1;
+ } else if (len == 0) {
+ con->is_readable = 0;
+ /* the other end close the connection -> KEEP-ALIVE */
+
+- /* pipelining */
+- buffer_free(b);
+-
+ return -2;
+ }
+
+@@ -321,26 +318,41 @@
+ static int connection_handle_read(server *srv, connection *con) {
+ int len;
+ buffer *b;
+- int toread;
++ int toread, read_offset;
+
+ if (con->conf.is_ssl) {
+ return connection_handle_read_ssl(srv, con);
+ }
+
++ b = (NULL != con->read_queue->last) ? con->read_queue->last->mem : NULL;
++
++ /* default size for chunks is 4kb; only use bigger chunks if FIONREAD tells
++ * us more than 4kb is available
++ * if FIONREAD doesn't signal a big chunk we fill the previous buffer
++ * if it has >= 1kb free
++ */
+ #if defined(__WIN32)
+- b = chunkqueue_get_append_buffer(con->read_queue);
+- buffer_prepare_copy(b, 4 * 1024);
+- len = recv(con->fd, b->ptr, b->size - 1, 0);
+-#else
+- if (ioctl(con->fd, FIONREAD, &toread) || toread == 0) {
++ if (NULL == b || b->size - b->used < 1024) {
+ b = chunkqueue_get_append_buffer(con->read_queue);
+ buffer_prepare_copy(b, 4 * 1024);
++ }
++
++ read_offset = (b->used == 0) ? 0 : b->used - 1;
++ len = recv(con->fd, b->ptr + read_offset, b->size - 1 - read_offset, 0);
++#else
++ if (ioctl(con->fd, FIONREAD, &toread) || toread == 0 || toread <= 4*1024) {
++ if (NULL == b || b->size - b->used < 1024) {
++ b = chunkqueue_get_append_buffer(con->read_queue);
++ buffer_prepare_copy(b, 4 * 1024);
++ }
+ } else {
+ if (toread > MAX_READ_LIMIT) toread = MAX_READ_LIMIT;
+ b = chunkqueue_get_append_buffer(con->read_queue);
+ buffer_prepare_copy(b, toread + 1);
+ }
+- len = read(con->fd, b->ptr, b->size - 1);
++
++ read_offset = (b->used == 0) ? 0 : b->used - 1;
++ len = read(con->fd, b->ptr + read_offset, b->size - 1 - read_offset);
+ #endif
+
+ if (len < 0) {
+@@ -374,7 +386,8 @@
+ con->is_readable = 0;
+ }
+
+- b->used = len;
++ if (b->used > 0) b->used--;
++ b->used += len;
+ b->ptr[b->used++] = '\0';
+
+ con->bytes_read += len;
+@@ -841,13 +854,6 @@
+ /* The cond_cache gets reset in response.c */
+ /* config_cond_cache_reset(srv, con); */
+
+-#ifdef USE_OPENSSL
+- if (con->ssl_error_want_reuse_buffer) {
+- buffer_free(con->ssl_error_want_reuse_buffer);
+- con->ssl_error_want_reuse_buffer = NULL;
+- }
+-#endif
+-
+ con->header_len = 0;
+ con->in_error_handler = 0;
+
+@@ -1131,8 +1137,15 @@
+ } else {
+ buffer *b;
+
+- b = chunkqueue_get_append_buffer(dst_cq);
+- buffer_copy_string_len(b, c->mem->ptr + c->offset, toRead);
++ if (dst_cq->last &&
++ dst_cq->last->type == MEM_CHUNK) {
++ b = dst_cq->last->mem;
++ } else {
++ b = chunkqueue_get_append_buffer(dst_cq);
++ /* prepare buffer size for remaining POST data; is < 64kb */
++ buffer_prepare_copy(b, con->request.content_length - dst_cq->bytes_in + 1);
++ }
++ buffer_append_string_len(b, c->mem->ptr + c->offset, toRead);
+ }
+
+ c->offset += toRead;
diff -r 6135d8b0a676 usr/src/cmd/mysql-5-1/Makefile.sfw
--- a/usr/src/cmd/mysql-5-1/Makefile.sfw Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/cmd/mysql-5-1/Makefile.sfw Thu Sep 30 01:30:20 2010 +0100
@@ -19,9 +19,9 @@
#
# CDDL HEADER END
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#ident "@(#)Makefile.sfw 1.6 10/01/26 SMI"
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+#ident "@(#)Makefile.sfw 1.7 10/09/03 SMI"
MYSQL_VERSION=5.1.37
@@ -83,6 +83,7 @@
#These COMMON_CONFIG_OPTIONS are common for both 32 and 64-bit
COMMON_CONFIG_OPTIONS= \
+ ac_cv_func_stpcpy=no \
--prefix=$(PREFIX) \
--localstatedir=$(DATA_PREFIX)/data \
--datadir=$(PREFIX)/share \
diff -r 6135d8b0a676 usr/src/cmd/procmail/Makefile.sfw
--- a/usr/src/cmd/procmail/Makefile.sfw Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/cmd/procmail/Makefile.sfw Thu Sep 30 01:30:20 2010 +0100
@@ -19,10 +19,9 @@
# CDDL HEADER END
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
-#ident "@(#)Makefile.sfw 1.3 10/03/16 SMI"
+#ident "@(#)Makefile.sfw 1.4 10/09/03 SMI"
include ../Makefile.cmd
@@ -84,6 +83,7 @@
mv $(PROD)/src/Makefile.0 $(PROD)/src/Makefile.0.orig
echo "SHELL=$(BASH)" > $(PROD)/src/Makefile.0
cat $(PROD)/src/Makefile.0.orig >> $(PROD)/src/Makefile.0
+ gpatch -p0 < getline.patches
$(TOUCH) $@
clean:
diff -r 6135d8b0a676 usr/src/cmd/procmail/getline.patches
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/procmail/getline.patches Thu Sep 30 01:30:20 2010 +0100
@@ -0,0 +1,88 @@
+*** procmail-3.22/src/formisc.h.orig Thu Sep 2 11:23:03 2010
+--- procmail-3.22/src/formisc.h Thu Sep 2 11:23:12 2010
+***************
+*** 17,20 ****
+ char*
+ skipwords P((char*start));
+ int
+! getline P((void));
+--- 17,20 ----
+ char*
+ skipwords P((char*start));
+ int
+! my_getline P((void));
+*** procmail-3.22/src/fields.c.orig Thu Sep 2 11:23:21 2010
+--- procmail-3.22/src/fields.c Thu Sep 2 11:23:33 2010
+***************
+*** 110,125 ****
+ /* try and append one valid field to rdheader from stdin */
+ int readhead P((void))
+ { int idlen;
+! getline();
+ if((idlen=breakfield(buf,buffilled))<=0) /* not the start of a valid field */
+ return 0;
+ if(idlen==STRLEN(FROM)&&eqFrom_(buf)) /* it's a From_ line */
+ { if(rdheader)
+ return 0; /* the From_ line was a fake! */
+! for(;buflast=='>';getline()); /* gather continued >From_ lines */
+ }
+ else
+! for(;;getline()) /* get the rest of the continued field */
+ { switch(buflast) /* will this line be continued? */
+ { case ' ':case '\t': /* yep, it sure is */
+ continue;
+--- 110,125 ----
+ /* try and append one valid field to rdheader from stdin */
+ int readhead P((void))
+ { int idlen;
+! my_getline();
+ if((idlen=breakfield(buf,buffilled))<=0) /* not the start of a valid field */
+ return 0;
+ if(idlen==STRLEN(FROM)&&eqFrom_(buf)) /* it's a From_ line */
+ { if(rdheader)
+ return 0; /* the From_ line was a fake! */
+! for(;buflast=='>';my_getline()); /* gather continued >From_ lines */
+ }
+ else
+! for(;;my_getline()) /* get the rest of the continued field */
+ { switch(buflast) /* will this line be continued? */
+ { case ' ':case '\t': /* yep, it sure is */
+ continue;
+*** procmail-3.22/src/formail.c.orig Thu Sep 2 11:23:43 2010
+--- procmail-3.22/src/formail.c Thu Sep 2 11:23:49 2010
+***************
+*** 819,825 ****
+ { if(split) /* gobble up the next start separator */
+ { buffilled=0;
+ #ifdef sMAILBOX_SEPARATOR
+! getline();buffilled=0; /* but only if it's defined */
+ #endif
+ if(buflast!=EOF) /* if any */
+ goto splitit;
+--- 819,825 ----
+ { if(split) /* gobble up the next start separator */
+ { buffilled=0;
+ #ifdef sMAILBOX_SEPARATOR
+! my_getline();buffilled=0; /* but only if it's defined */
+ #endif
+ if(buflast!=EOF) /* if any */
+ goto splitit;
+*** procmail-3.22/src/formisc.c.orig Thu Sep 2 11:23:58 2010
+--- procmail-3.22/src/formisc.c Thu Sep 2 11:24:05 2010
+***************
+*** 115,121 ****
+ buf[buffilled++]=c;
+ }
+
+! int getline P((void)) /* read a newline-terminated line */
+ { if(buflast==EOF) /* at the end of our Latin already? */
+ { loadchar('\n'); /* fake empty line */
+ return EOF; /* spread the word */
+--- 115,121 ----
+ buf[buffilled++]=c;
+ }
+
+! int my_getline P((void)) /* read a newline-terminated line */
+ { if(buflast==EOF) /* at the end of our Latin already? */
+ { loadchar('\n'); /* fake empty line */
+ return EOF; /* spread the word */
diff -r 6135d8b0a676 usr/src/cmd/samba/Patches/lib-interfaces.c.diff
--- a/usr/src/cmd/samba/Patches/lib-interfaces.c.diff Fri Sep 03 00:29:14 2010 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- source3/lib/interfaces.c 2010-07-07 02:27:50.253468600 -0700
-+++ source3/lib/interfaces.c 2010-07-07 02:28:09.889882500 -0700
-@@ -172,7 +172,7 @@
- ifaces[total].flags = ifptr->ifa_flags;
-
- #if defined(HAVE_IPV6)
-- if (ifptr->ifa_addr->sa_family == AF_INET6) {
-+ if (ifptr->ifa_addr->ss_family == AF_INET6) {
- copy_size = sizeof(struct sockaddr_in6);
- }
- #endif
diff -r 6135d8b0a676 usr/src/cmd/samba/Patches/lib-replace-test-getifaddrs.c.diff
--- a/usr/src/cmd/samba/Patches/lib-replace-test-getifaddrs.c.diff Fri Sep 03 00:29:14 2010 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- getifaddrs.c 2010-07-07 07:34:49.933019300 -0700
-+++ lib/replace/test/getifaddrs.c 2010-07-07 07:35:15.850166600 -0700
-@@ -84,7 +84,7 @@
- printf("NETMASK=%s", addrstring);
- }
- } else {
-- printf("AF=%d ", ifs->ifa_addr->sa_family);
-+ printf("AF=%d ", ifs->ifa_addr->ss_family);
- }
- } else {
- printf("<no address>");
diff -r 6135d8b0a676 usr/src/cmd/samba/Solaris/sam-lib.h
--- a/usr/src/cmd/samba/Solaris/sam-lib.h Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/cmd/samba/Solaris/sam-lib.h Thu Sep 30 01:30:20 2010 +0100
@@ -123,7 +123,6 @@
#ifndef SAM_LIB_GNU /* Do not define these for GNU code */
extern void error (int, int, char *, ...);
-extern char *stpcpy (char *, char *);
#endif
extern int SAM_fd; /* File descriptor for .ioctl file */
diff -r 6135d8b0a676 usr/src/cmd/vim/runtime.patch
--- a/usr/src/cmd/vim/runtime.patch Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/cmd/vim/runtime.patch Thu Sep 30 01:30:20 2010 +0100
@@ -3101,7 +3101,7 @@
+ \%f:%l:%c:\ %m,
\%f:%l:\ %m,
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
- \10/08/31*\\a[%*\\d]:\ Entering\ directory\ `%f',
+ \10/09/14*\\a[%*\\d]:\ Entering\ directory\ `%f',
diff -Nur runtime.patched/compiler/jikes.vim runtime/compiler/jikes.vim
--- runtime.patched/compiler/jikes.vim 2004-06-07 07:32:36.000000000 -0700
+++ runtime/compiler/jikes.vim 2009-01-28 08:23:44.000000000 -0800
diff -r 6135d8b0a676 usr/src/lib/openssl/Patches/pkcs11-engine/hw_pk11.c
--- a/usr/src/lib/openssl/Patches/pkcs11-engine/hw_pk11.c Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/lib/openssl/Patches/pkcs11-engine/hw_pk11.c Thu Sep 30 01:30:20 2010 +0100
@@ -2,7 +2,7 @@
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
*/
-#pragma ident "@(#)hw_pk11.c 1.4 10/04/14 SMI"
+#pragma ident "@(#)hw_pk11.c 1.5 10/09/01 SMI"
/* crypto/engine/hw_pk11.c */
/*
@@ -1372,6 +1372,26 @@
#if 0
pFuncList->C_Finalize(NULL);
#endif
+#ifdef SOLARIS_AES_CTR
+ {
+ ASN1_OBJECT *ob = NULL;
+ if (NID_aes_128_ctr != NID_undef) {
+ ob = OBJ_nid2obj(NID_aes_128_ctr);
+ if (ob != NULL)
+ ASN1_OBJECT_free(ob);
+ }
+ if (NID_aes_192_ctr != NID_undef) {
+ ob = OBJ_nid2obj(NID_aes_192_ctr);
+ if (ob != NULL)
+ ASN1_OBJECT_free(ob);
+ }
+ if (NID_aes_256_ctr != NID_undef) {
+ ob = OBJ_nid2obj(NID_aes_256_ctr);
+ if (ob != NULL)
+ ASN1_OBJECT_free(ob);
+ }
+ }
+#endif
if (!DSO_free(pk11_dso))
{
@@ -3619,7 +3639,7 @@
int n_cipher = 0, n_digest = 0;
CK_FUNCTION_LIST_PTR pflist = NULL;
CK_SLOT_ID_PTR pSlotList = NULL_PTR;
- int *tmp_hw_cnids, *tmp_hw_dnids;
+ int *tmp_hw_cnids = NULL, *tmp_hw_dnids = NULL;
int hw_ctable_size, hw_dtable_size;
#ifdef DEBUG_SLOT_SELECTION
diff -r 6135d8b0a676 usr/src/lib/openssl/Patches/pkcs11-engine/hw_pk11_err.c
--- a/usr/src/lib/openssl/Patches/pkcs11-engine/hw_pk11_err.c Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/lib/openssl/Patches/pkcs11-engine/hw_pk11_err.c Thu Sep 30 01:30:20 2010 +0100
@@ -1,9 +1,8 @@
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
*/
-#pragma ident "@(#)hw_pk11_err.c 1.2 09/11/10 SMI"
+#pragma ident "@(#)hw_pk11_err.c 1.3 10/09/01 SMI"
/* crypto/engine/hw_pk11_err.c */
/*
@@ -213,14 +212,14 @@
{ PK11_R_KEY_OR_IV_LEN_PROBLEM, "IV or key length incorrect"},
{ PK11_R_INVALID_OPERATION_TYPE, "invalid operation type"},
{ PK11_R_ADD_NID_FAILED, "failed to add NID" },
-{ PK11_R_ATFORK_FAILED, "atfork() failed" },
-{ PK11_R_TOKEN_LOGIN_FAILED, "C_Login() failed on token" },
+{ PK11_R_ATFORK_FAILED, "atfork failed" },
+{ PK11_R_TOKEN_LOGIN_FAILED, "C_Login failed on token" },
{ PK11_R_MORE_THAN_ONE_OBJECT_FOUND, "more than one object found" },
{ PK11_R_INVALID_PKCS11_URI, "pkcs11 URI provided is invalid" },
{ PK11_R_COULD_NOT_READ_PIN, "could not read PIN from terminal" },
{ PK11_R_PIN_NOT_READ_FROM_COMMAND, "PIN not read from external command" },
-{ PK11_R_COULD_NOT_OPEN_COMMAND, "could not popen() dialog command" },
-{ PK11_R_PIPE_FAILED, "pipe() failed" },
+{ PK11_R_COULD_NOT_OPEN_COMMAND, "could not popen dialog command" },
+{ PK11_R_PIPE_FAILED, "pipe failed" },
{ PK11_R_BAD_PASSPHRASE_SPEC, "bad passphrasedialog specification" },
{ PK11_R_TOKEN_NOT_INITIALIZED, "token not initialized" },
{ PK11_R_TOKEN_PIN_NOT_SET, "token PIN required but not set" },
@@ -230,11 +229,11 @@
{ PK11_R_PRIV_KEY_NOT_FOUND, "private key not found in keystore" },
{ PK11_R_NO_OBJECT_FOUND, "specified object not found" },
{ PK11_R_PIN_CACHING_POLICY_INVALID, "PIN set but caching policy invalid" },
-{ PK11_R_SYSCONF_FAILED, "sysconf() failed" },
-{ PK11_R_MMAP_FAILED, "mmap() failed" },
+{ PK11_R_SYSCONF_FAILED, "sysconf failed" },
+{ PK11_R_MMAP_FAILED, "mmap failed" },
{ PK11_R_PRIV_PROC_LOCK_MEMORY_MISSING, "PROC_LOCK_MEMORY privilege missing" },
-{ PK11_R_MLOCK_FAILED, "mlock() failed" },
-{ PK11_R_FORK_FAILED, "fork() failed" },
+{ PK11_R_MLOCK_FAILED, "mlock failed" },
+{ PK11_R_FORK_FAILED, "fork failed" },
{ 0, NULL}
};
#endif /* OPENSSL_NO_ERR */
diff -r 6135d8b0a676 usr/src/lib/openssl/Patches/pkcs11-engine/hw_pk11_pub.c
--- a/usr/src/lib/openssl/Patches/pkcs11-engine/hw_pk11_pub.c Fri Sep 03 00:29:14 2010 -0700
+++ b/usr/src/lib/openssl/Patches/pkcs11-engine/hw_pk11_pub.c Thu Sep 30 01:30:20 2010 +0100
@@ -1,9 +1,8 @@
/*
- * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
*/
-#pragma ident "@(#)hw_pk11_pub.c 1.3 10/02/01 SMI"
+#pragma ident "@(#)hw_pk11_pub.c 1.4 10/09/01 SMI"
/* crypto/engine/hw_pk11_pub.c */
/*
@@ -481,7 +480,7 @@
num = BN_num_bytes(rsa->n);
if ((buf = (unsigned char *)OPENSSL_malloc(num)) == NULL)
{
- RSAerr(PK11_F_RSA_PUB_ENC, PK11_R_MALLOC_FAILURE);
+ PK11err(PK11_F_RSA_PUB_ENC, PK11_R_MALLOC_FAILURE);
goto err;
}
@@ -502,7 +501,7 @@
i = RSA_padding_add_none(buf, num, from, flen);
break;
default:
- RSAerr(PK11_F_RSA_PUB_ENC, PK11_R_UNKNOWN_PADDING_TYPE);
+ PK11err(PK11_F_RSA_PUB_ENC, PK11_R_UNKNOWN_PADDING_TYPE);
goto err;
}
if (i <= 0) goto err;
@@ -532,7 +531,7 @@
num = BN_num_bytes(rsa->n);
if ((buf = (unsigned char *)OPENSSL_malloc(num)) == NULL)
{
- RSAerr(PK11_F_RSA_PRIV_ENC, PK11_R_MALLOC_FAILURE);
+ PK11err(PK11_F_RSA_PRIV_ENC, PK11_R_MALLOC_FAILURE);
goto err;
}
@@ -546,7 +545,7 @@
break;
case RSA_SSLV23_PADDING:
default:
- RSAerr(PK11_F_RSA_PRIV_ENC, PK11_R_UNKNOWN_PADDING_TYPE);
+ PK11err(PK11_F_RSA_PRIV_ENC, PK11_R_UNKNOWN_PADDING_TYPE);
goto err;
}
if (i <= 0) goto err;
@@ -577,7 +576,7 @@
if ((buf = (unsigned char *)OPENSSL_malloc(num)) == NULL)
{
- RSAerr(PK11_F_RSA_PRIV_DEC, PK11_R_MALLOC_FAILURE);
+ PK11err(PK11_F_RSA_PRIV_DEC, PK11_R_MALLOC_FAILURE);
goto err;
}
@@ -587,7 +586,7 @@
*/
if (flen > num)
{
- RSAerr(PK11_F_RSA_PRIV_DEC,
+ PK11err(PK11_F_RSA_PRIV_DEC,
PK11_R_DATA_GREATER_THAN_MOD_LEN);
goto err;
}
@@ -598,7 +597,7 @@
if (BN_ucmp(&f, rsa->n) >= 0)
{
- RSAerr(PK11_F_RSA_PRIV_DEC,
+ PK11err(PK11_F_RSA_PRIV_DEC,
PK11_R_DATA_TOO_LARGE_FOR_MODULUS);
goto err;
}
@@ -634,11 +633,11 @@
r = RSA_padding_check_none(to, num, p, j, num);
break;
default:
- RSAerr(PK11_F_RSA_PRIV_DEC, PK11_R_UNKNOWN_PADDING_TYPE);
+ PK11err(PK11_F_RSA_PRIV_DEC, PK11_R_UNKNOWN_PADDING_TYPE);
goto err;
}
if (r < 0)
- RSAerr(PK11_F_RSA_PRIV_DEC, PK11_R_PADDING_CHECK_FAILED);
+ PK11err(PK11_F_RSA_PRIV_DEC, PK11_R_PADDING_CHECK_FAILED);
err:
BN_clear_free(&f);
@@ -664,7 +663,7 @@
buf = (unsigned char *)OPENSSL_malloc(num);
if (buf == NULL)
{
- RSAerr(PK11_F_RSA_PUB_DEC, PK11_R_MALLOC_FAILURE);
+ PK11err(PK11_F_RSA_PUB_DEC, PK11_R_MALLOC_FAILURE);
goto err;
}
@@ -674,7 +673,7 @@
*/
if (flen > num)
{
- RSAerr(PK11_F_RSA_PUB_DEC, PK11_R_DATA_GREATER_THAN_MOD_LEN);
+ PK11err(PK11_F_RSA_PUB_DEC, PK11_R_DATA_GREATER_THAN_MOD_LEN);
goto err;
}
@@ -683,7 +682,7 @@
if (BN_ucmp(&f, rsa->n) >= 0)
{
- RSAerr(PK11_F_RSA_PUB_DEC,
+ PK11err(PK11_F_RSA_PUB_DEC,
PK11_R_DATA_TOO_LARGE_FOR_MODULUS);
goto err;
}
@@ -711,11 +710,11 @@
r = RSA_padding_check_none(to, num, p, i, num);
break;
default:
- RSAerr(PK11_F_RSA_PUB_DEC, PK11_R_UNKNOWN_PADDING_TYPE);
+ PK11err(PK11_F_RSA_PUB_DEC, PK11_R_UNKNOWN_PADDING_TYPE);
goto err;
}
if (r < 0)
- RSAerr(PK11_F_RSA_PUB_DEC, PK11_R_PADDING_CHECK_FAILED);
+ PK11err(PK11_F_RSA_PUB_DEC, PK11_R_PADDING_CHECK_FAILED);
err:
BN_clear_free(&f);
More information about the oi-dev
mailing list