components/openssl/openssl-1.0.1/patches/30_wanboot.patch
author Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
Fri, 15 Feb 2013 07:58:18 -0800
changeset 1158 227137d9fbce
parent 763 components/openssl/openssl-1.0.0/patches/30_wanboot.patch@45da4d38492e
child 1680 49cf3ba424f0
permissions -rw-r--r--
PSARC 2013/034 OpenSSL 1.0.1 15824597 SUNBT7206149 Resynch with the latest OpenSSL (1.0.1e)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     1
--- openssl-1.0.0g/Makefile.org	2010-01-27 08:06:58.000000000 -0800
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     2
+++ openssl-1.0.0g-1/Makefile.org	2012-03-26 03:04:08.440194448 -0700
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
     3
@@ -138,7 +138,13 @@
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
     4
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
     5
 BASEADDR=
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
     6
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     7
+# For wanboot, we only need crypto and ssl.
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     8
+# 'apps' are not patched to work in stand-alone environment anyway.
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     9
+ifeq ($(PLATFORM), solaris64-sparcv9-cc-sunw-wanboot)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    10
+DIRS=   crypto ssl
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    11
+else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    12
 DIRS=   crypto ssl engines apps test tools
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    13
+endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    14
 ENGDIRS= ccgost
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    15
 SHLIBDIRS= crypto ssl
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
    16
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    17
--- openssl-1.0.0g/Makefile	2012-01-18 05:42:28.000000000 -0800
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    18
+++ openssl-1.0.0g-1/Makefile	2012-03-26 03:03:59.170540344 -0700
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
    19
@@ -137,7 +137,13 @@
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
    20
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
    21
 BASEADDR=0xFB00000
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
    22
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    23
+# For wanboot, we only need crypto and ssl.
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    24
+# 'apps' are not patched to work in stand-alone environment anyway.
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    25
+ifeq ($(PLATFORM), solaris64-sparcv9-cc-sunw-wanboot)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    26
+DIRS=   crypto ssl
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    27
+else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    28
 DIRS=   crypto ssl engines apps test tools
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    29
+endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    30
 ENGDIRS= ccgost
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    31
 SHLIBDIRS= crypto ssl
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
    32
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    33
--- openssl-1.0.0e/crypto/cryptlib.c	2011-06-22 08:39:00.000000000 -0700
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    34
+++ openssl-1.0.0e_patched/crypto/cryptlib.c	2011-12-12 06:17:45.422476900 -0800
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
    35
@@ -900,6 +900,10 @@
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    36
 	MessageBox (NULL,buf,_T("OpenSSL: FATAL"),MB_OK|MB_ICONSTOP);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    37
 }
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    38
 #else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    39
+/* Solaris libsa.a used for WAN boot doesn't provide for vfprintf(). Since
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    40
+ *  * OPENSSL_showfatal() is not used anywhere else then here we can safely use
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    41
+ *   * the code from 0.9.7d version. */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    42
+#ifndef	_BOOT
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    43
 void OPENSSL_showfatal (const char *fmta,...)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    44
 { va_list ap;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    45
 
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
    46
@@ -907,14 +911,21 @@
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    47
     vfprintf (stderr,fmta,ap);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    48
     va_end (ap);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    49
 }
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    50
+#endif	/* _BOOT */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    51
 int OPENSSL_isservice (void) { return 0; }
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    52
 #endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    53
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    54
 void OpenSSLDie(const char *file,int line,const char *assertion)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    55
 	{
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    56
+#ifndef	_BOOT		
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    57
 	OPENSSL_showfatal(
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    58
 		"%s(%d): OpenSSL internal error, assertion failed: %s\n",
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    59
 		file,line,assertion);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    60
+#else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    61
+	fprintf(stderr,
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    62
+		"%s(%d): OpenSSL internal error, assertion failed: %s\n",
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    63
+		file,line,assertion);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    64
+#endif	
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    65
 #if !defined(_WIN32) || defined(__CYGWIN__)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    66
 	abort();
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    67
 #else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    68
--- openssl-1.0.0e/crypto/err/err_all.c	2009-08-09 07:58:05.000000000 -0700
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    69
+++ openssl-1.0.0e_patched/crypto/err/err_all.c	2011-12-13 05:22:01.205351400 -0800
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
    70
@@ -148,7 +148,9 @@
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    71
 	ERR_load_X509V3_strings();
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    72
 	ERR_load_PKCS12_strings();
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    73
 	ERR_load_RAND_strings();
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    74
+#ifndef _BOOT
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    75
 	ERR_load_DSO_strings();
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    76
+#endif /* _BOOT */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    77
 	ERR_load_TS_strings();
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    78
 #ifndef OPENSSL_NO_ENGINE
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    79
 	ERR_load_ENGINE_strings();
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    80
--- openssl-1.0.0e/crypto/evp/evp_key.c	2010-03-27 12:27:50.000000000 -0700
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    81
+++ openssl-1.0.0e_patched/crypto/evp/evp_key.c	2011-12-13 05:19:32.956908600 -0800
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    82
@@ -84,7 +84,7 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    83
 	else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    84
 		return(prompt_string);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    85
 	}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    86
-
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    87
+#ifndef	_BOOT
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    88
 /* For historical reasons, the standard function for reading passwords is
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    89
  * in the DES library -- if someone ever wants to disable DES,
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    90
  * this function will fail */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    91
@@ -111,6 +111,7 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    92
 	OPENSSL_cleanse(buff,BUFSIZ);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    93
 	return ret;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    94
 	}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    95
+#endif	/* !_BOOT */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    96
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    97
 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    98
 	     const unsigned char *salt, const unsigned char *data, int datal,
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    99
--- openssl-1.0.0e/crypto/rand/rand_unix.c	2009-04-06 07:31:36.000000000 -0700
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   100
+++ openssl-1.0.0e_patched/crypto/rand/rand_unix.c	2011-12-19 07:28:39.988944800 -0800
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   101
@@ -122,7 +122,11 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   102
 #include <sys/time.h>
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   103
 #include <sys/times.h>
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   104
 #include <sys/stat.h>
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   105
+#ifdef	_BOOT
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   106
+#include <sys/fcntl.h>
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   107
+#else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   108
 #include <fcntl.h>
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   109
+#endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   110
 #include <unistd.h>
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   111
 #include <time.h>
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   112
 #if defined(OPENSSL_SYS_LINUX) /* should actually be available virtually everywhere */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   113
@@ -253,6 +257,11 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   114
 	const char **egdsocket = NULL;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   115
 #endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   116
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   117
+#ifdef _BOOT
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   118
+/* open() is provided by standalone libsa not visible from here */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   119
+extern int open(const char *, int);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   120
+#endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   121
+
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   122
 #ifdef DEVRANDOM
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   123
 	memset(randomstats,0,sizeof(randomstats));
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   124
 	/* Use a random entropy pool device. Linux, FreeBSD and OpenBSD
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   125
@@ -295,9 +304,13 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   126
 				{
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   127
 				int try_read = 0;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   128
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   129
-#if defined(OPENSSL_SYS_BEOS_R5)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   130
+#if defined(OPENSSL_SYS_BEOS_R5) || defined(_BOOT)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   131
 				/* select() is broken in BeOS R5, so we simply
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   132
 				 *  try to read something and snooze if we couldn't */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   133
+				/* 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   134
+				 * select() is not available when linking stand-alone
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   135
+				 * library for wanboot 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   136
+				 */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   137
 				try_read = 1;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   138
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   139
 #elif defined(OPENSSL_SYS_LINUX)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   140
@@ -355,6 +368,7 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   141
 				else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   142
 					r = -1;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   143
 				
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   144
+#ifndef	_BOOT				
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   145
 				/* Some Unixen will update t in select(), some
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   146
 				   won't.  For those who won't, or if we
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   147
 				   didn't use select() in the first place,
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   148
@@ -366,13 +380,17 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   149
 				}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   150
 			while ((r > 0 ||
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   151
 			       (errno == EINTR || errno == EAGAIN)) && usec != 0 && n < ENTROPY_NEEDED);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   152
+#else	/* _BOOT */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   153
+				}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   154
+			while (r > 0 && n < ENTROPY_NEEDED);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   155
+#endif	/* _BOOT */			
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   156
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   157
 			close(fd);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   158
 			}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   159
 		}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   160
 #endif /* defined(DEVRANDOM) */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   161
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   162
-#ifdef DEVRANDOM_EGD
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   163
+#if defined(DEVRANDOM_EGD) && !defined(_BOOT)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   164
 	/* Use an EGD socket to read entropy from an EGD or PRNGD entropy
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   165
 	 * collecting daemon. */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   166
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   167
@@ -395,6 +413,7 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   168
 		}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   169
 #endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   170
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   171
+#ifndef	_BOOT
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   172
 	/* put in some default random data, we need more than just this */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   173
 	l=curr_pid;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   174
 	RAND_add(&l,sizeof(l),0.0);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   175
@@ -403,6 +422,7 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   176
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   177
 	l=time(NULL);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   178
 	RAND_add(&l,sizeof(l),0.0);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   179
+#endif /* !_BOOT */	
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   180
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   181
 #if defined(OPENSSL_SYS_BEOS)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   182
 	{
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   183
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   184
--- openssl-1.0.0e/crypto/rand/randfile.c	2011-03-19 02:44:37.000000000 -0700
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   185
+++ openssl-1.0.0e_patched/crypto/rand/randfile.c	2011-12-13 05:26:51.884824200 -0800
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   186
@@ -57,9 +57,11 @@
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   187
  */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   188
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   189
 /* We need to define this to get macros like S_IFBLK and S_IFCHR */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   190
+#ifndef	_BOOT
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   191
 #if !defined(OPENSSL_SYS_VXWORKS)
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   192
 #define _XOPEN_SOURCE 500
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   193
 #endif
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   194
+#endif	/* _BOOT */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   195
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   196
 #include <errno.h>
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   197
 #include <stdio.h>
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   198
--- openssl-1.0.0e/crypto/x509v3/v3_utl.c	2009-07-27 14:08:53.000000000 -0700
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   199
+++ openssl-1.0.0e_patched/crypto/x509v3/v3_utl.c	2011-12-13 05:10:08.844191400 -0800
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   200
@@ -659,9 +659,52 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   201
 		}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   202
 	}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   203
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   204
+#if	defined(_BOOT)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   205
+/* This function was copied from bio/b_sock.c */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   206
+static int get_ip(const char *str, unsigned char ip[4])
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   207
+	{
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   208
+	unsigned int tmp[4];
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   209
+	int num=0,c,ok=0;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   210
+
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   211
+	tmp[0]=tmp[1]=tmp[2]=tmp[3]=0;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   212
+
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   213
+	for (;;)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   214
+		{
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   215
+		c= *(str++);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   216
+		if ((c >= '0') && (c <= '9'))
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   217
+			{
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   218
+			ok=1;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   219
+			tmp[num]=tmp[num]*10+c-'0';
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   220
+			if (tmp[num] > 255) return(0);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   221
+			}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   222
+		else if (c == '.')
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   223
+			{
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   224
+			if (!ok) return(-1);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   225
+			if (num == 3) return(0);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   226
+			num++;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   227
+			ok=0;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   228
+			}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   229
+		else if (c == '\0' && (num == 3) && ok)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   230
+			break;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   231
+		else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   232
+			return(0);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   233
+		}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   234
+	ip[0]=tmp[0];
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   235
+	ip[1]=tmp[1];
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   236
+	ip[2]=tmp[2];
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   237
+	ip[3]=tmp[3];
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   238
+	return(1);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   239
+	}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   240
+#endif /* _BOOT */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   241
+
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   242
 static int ipv4_from_asc(unsigned char *v4, const char *in)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   243
 	{
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   244
 	int a0, a1, a2, a3;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   245
+
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   246
+#if	defined(_BOOT)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   247
+	if (get_ip(in, v4) != 1)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   248
+		return 0;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   249
+#else	/* _BOOT */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   250
 	if (sscanf(in, "%d.%d.%d.%d", &a0, &a1, &a2, &a3) != 4)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   251
 		return 0;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   252
 	if ((a0 < 0) || (a0 > 255) || (a1 < 0) || (a1 > 255)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   253
@@ -671,6 +716,7 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   254
 	v4[1] = a1;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   255
 	v4[2] = a2;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   256
 	v4[3] = a3;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   257
+#endif	/* _BOOT */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   258
 	return 1;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   259
 	}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   260
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   261
--- openssl-1.0.0e/e_os.h	2011-12-19 04:17:51.631087400 -0800
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   262
+++ openssl-1.0.0e_patched/e_os.h	2011-12-19 04:15:15.776668900 -0800
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   263
@@ -206,10 +206,19 @@
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   264
 #define get_last_socket_error()	errno
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   265
 #define clear_socket_error()	errno=0
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   266
 #define ioctlsocket(a,b,c)	ioctl(a,b,c)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   267
+#ifdef	_BOOT
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   268
+#include <netinet/in.h>
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   269
+extern int socket_read(int, void *, size_t, int);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   270
+extern int socket_close(int);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   271
+#define	closesocket(s)		socket_close(s)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   272
+#define	readsocket(s,b,n)	socket_read((s),(b),(n), 200)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   273
+#define	writesocket(s,b,n)	send((s),(b),(n), 0)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   274
+#else  /* !_BOOT */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   275
 #define closesocket(s)		close(s)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   276
 #define readsocket(s,b,n)	read((s),(b),(n))
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   277
 #define writesocket(s,b,n)	write((s),(b),(n))
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   278
 #endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   279
+#endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   280
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   281
 #ifdef WIN16 /* never the case */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   282
 #  define MS_CALLBACK	_far _loadds
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   283
--- openssl-1.0.0e/crypto/sparcv9cap.c	2010-09-05 12:48:01.000000000 -0700
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   284
+++ openssl-1.0.0e_patched/crypto/sparcv9cap.c	2011-12-23 05:24:02.011607700 -0800
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   285
@@ -12,7 +12,11 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   286
 #define SPARCV9_VIS2		(1<<3)	/* reserved */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   287
 #define SPARCV9_FMADD		(1<<4)	/* reserved for SPARC64 V */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   288
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   289
+#ifndef	_BOOT
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   290
 static int OPENSSL_sparcv9cap_P=SPARCV9_TICK_PRIVILEGED;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   291
+#else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   292
+static int OPENSSL_sparcv9cap_P = SPARCV9_VIS1;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   293
+#endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   294
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   295
 int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np,const BN_ULONG *n0, int num)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   296
 	{
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   297
@@ -33,6 +37,7 @@
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   298
 void		_sparcv9_vis2_probe(void);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   299
 void		_sparcv9_fmadd_probe(void);
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   300
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   301
+#ifndef _BOOT
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   302
 unsigned long OPENSSL_rdtsc(void)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   303
 	{
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   304
 	if (OPENSSL_sparcv9cap_P&SPARCV9_TICK_PRIVILEGED)
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   305
@@ -44,8 +49,19 @@
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   306
 	else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   307
 		return _sparcv9_rdtick();
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   308
 	}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   309
+#endif
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   310
+
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   311
+#if defined(_BOOT)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   312
+/*
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   313
+ * Hardcoding sparc capabilities for wanboot.
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   314
+ * Older CPUs are EOLed anyway.
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   315
+ */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   316
+void OPENSSL_cpuid_setup(void)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   317
+	{
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   318
+	OPENSSL_sparcv9cap_P = SPARCV9_VIS1;
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   319
+	}
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   320
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   321
-#if 0 && defined(__sun) && defined(__SVR4)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   322
+#elif 0 && defined(__sun) && defined(__SVR4)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   323
 /* This code path is disabled, because of incompatibility of
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   324
  * libdevinfo.so.1 and libmalloc.so.1 (see below for details)
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   325
  */
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   326
--- openssl-1.0.0e/crypto/sparccpuid.S	2010-09-05 12:48:01.000000000 -0700
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   327
+++ openssl-1.0.0e_patched/crypto/sparccpuid.S	2012-02-13 07:42:58.259478325 -0800
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   328
@@ -397,6 +397,11 @@
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   329
 .type	OPENSSL_cleanse,#function
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   330
 .size	OPENSSL_cleanse,.-OPENSSL_cleanse
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   331
 
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   332
+#ifndef _BOOT
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   333
 .section	".init",#alloc,#execinstr
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   334
	call	OPENSSL_cpuid_setup
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   335
	nop
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   336
+#else
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   337
+	nop
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   338
+	nop
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   339
+#endif
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   340
--- openssl-1.0.1c/crypto/Makefile      Thu Aug  2 12:56:38 2012
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   341
+++ openssl-1.0.1c/crypto/Makefile.new  Thu Aug  2 12:59:43 2012
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   342
@@ -35,9 +35,9 @@
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   343
 LIB= $(TOP)/libcrypto.a
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   344
 SHARED_LIB= libcrypto$(SHLIB_EXT)
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   345
 LIBSRC=	cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   346
-	ebcdic.c uid.c o_time.c o_str.c o_dir.c o_fips.c o_init.c fips_ers.c
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   347
+	ebcdic.c uid.c o_time.c o_str.c o_dir.c o_fips.c o_init.c fips_ers.c wanboot-stubs.c
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   348
 LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o ebcdic.o \
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   349
-	uid.o o_time.o o_str.o o_dir.o o_fips.o o_init.o fips_ers.o $(CPUID_OBJ)
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   350
+	uid.o o_time.o o_str.o o_dir.o o_fips.o o_init.o fips_ers.o wanboot-stubs.o $(CPUID_OBJ)
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   351
763
45da4d38492e 7156086 OpenSSL for wanboot should not be build in a separate directory
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
   352
 SRC= $(LIBSRC)
1158
227137d9fbce PSARC 2013/034 OpenSSL 1.0.1
Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
parents: 763
diff changeset
   353