summaryrefslogtreecommitdiff
path: root/usr/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/common')
-rw-r--r--usr/src/common/net/wanboot/auxutil.c8
-rw-r--r--usr/src/common/net/wanboot/boot_http.c5
-rw-r--r--usr/src/common/net/wanboot/p12misc.c8
-rw-r--r--usr/src/common/ucode/ucode_utils.c11
-rw-r--r--usr/src/common/zfs/zpool_prop.c4
5 files changed, 26 insertions, 10 deletions
diff --git a/usr/src/common/net/wanboot/auxutil.c b/usr/src/common/net/wanboot/auxutil.c
index 0236776105..b7ea152efb 100644
--- a/usr/src/common/net/wanboot/auxutil.c
+++ b/usr/src/common/net/wanboot/auxutil.c
@@ -61,6 +61,10 @@
* in this library. None of these are exposed.
*/
+/*
+ * Copyright (c) 2012, OmniTI Computer Consulting, Inc. All rights reserved.
+ */
+
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
@@ -97,7 +101,11 @@ asc2bmpstring(const char *str, int len)
int unilen;
/* Convert the character to the bmp format. */
+#if OPENSSL_VERSION_NUMBER < 0x10000000L
if (asc2uni(str, len, &uni, &unilen) == 0) {
+#else
+ if (OPENSSL_asc2uni(str, len, &uni, &unilen) == 0) {
+#endif
SUNWerr(SUNW_F_ASC2BMPSTRING, SUNW_R_MEMORY_FAILURE);
return (NULL);
}
diff --git a/usr/src/common/net/wanboot/boot_http.c b/usr/src/common/net/wanboot/boot_http.c
index 3909d08714..737f49a8aa 100644
--- a/usr/src/common/net/wanboot/boot_http.c
+++ b/usr/src/common/net/wanboot/boot_http.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, OmniTI Computer Consulting, Inc. All rights reserved.
*/
#include <errno.h>
@@ -1767,7 +1768,11 @@ password_cb(char *buf, int buflen, int rwflag, void *userdata)
static SSL_CTX *
initialize_ctx(http_conn_t *c_id)
{
+#if OPENSSL_VERSION_NUMBER < 0x10000000L
SSL_METHOD *meth;
+#else
+ const SSL_METHOD *meth;
+#endif
SSL_CTX *ctx;
ERR_clear_error();
diff --git a/usr/src/common/net/wanboot/p12misc.c b/usr/src/common/net/wanboot/p12misc.c
index b8a4dfb3a2..23c9106da1 100644
--- a/usr/src/common/net/wanboot/p12misc.c
+++ b/usr/src/common/net/wanboot/p12misc.c
@@ -58,6 +58,10 @@
* Use is subject to license terms.
*/
+/*
+ * Copyright (c) 2012, OmniTI Computer Consulting, Inc. All rights reserved.
+ */
+
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
@@ -440,7 +444,11 @@ sunw_get_pkey_fname(getdo_actions_t dowhat, EVP_PKEY *pkey, char **fname)
}
str = ty->value.bmpstring;
+#if OPENSSL_VERSION_NUMBER < 0x10000000L
*fname = uni2asc(str->data, str->length);
+#else
+ *fname = OPENSSL_uni2asc(str->data, str->length);
+#endif
if (*fname == NULL) {
SUNWerr(SUNW_F_GET_PKEY_FNAME, SUNW_R_MEMORY_FAILURE);
return (-1);
diff --git a/usr/src/common/ucode/ucode_utils.c b/usr/src/common/ucode/ucode_utils.c
index 5878f4a4af..7721c5c310 100644
--- a/usr/src/common/ucode/ucode_utils.c
+++ b/usr/src/common/ucode/ucode_utils.c
@@ -142,21 +142,14 @@ ucode_validate_amd(uint8_t *ucodep, int size)
ptr = (uint32_t *)(((uint8_t *)ptr) + count);
size -= count;
- /*
- * minimum valid size:
- * - type and size fields (8 bytes)
- * - patch header (64 bytes)
- * - one patch triad (28 bytes)
- */
- while (size >= 100) {
+ while (size > 8) {
/* microcode patch */
size -= 4;
if (*ptr++ != 1)
return (EM_FILEFORMAT);
size -= 4;
- if (((count = *ptr++) > size) ||
- ((count - sizeof (ucode_header_amd_t)) % 28))
+ if (((count = *ptr++) > size))
return (EM_FILEFORMAT);
/* LINTED: pointer alignment */
diff --git a/usr/src/common/zfs/zpool_prop.c b/usr/src/common/zfs/zpool_prop.c
index add5bfb3a0..512e067507 100644
--- a/usr/src/common/zfs/zpool_prop.c
+++ b/usr/src/common/zfs/zpool_prop.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
*/
#include <sys/zio.h>
@@ -81,6 +81,8 @@ zpool_prop_init(void)
ZFS_TYPE_POOL, "<size>", "FREE");
zprop_register_number(ZPOOL_PROP_ALLOCATED, "allocated", 0,
PROP_READONLY, ZFS_TYPE_POOL, "<size>", "ALLOC");
+ zprop_register_number(ZPOOL_PROP_EXPANDSZ, "expandsize", 0,
+ PROP_READONLY, ZFS_TYPE_POOL, "<size>", "EXPANDSZ");
zprop_register_number(ZPOOL_PROP_CAPACITY, "capacity", 0, PROP_READONLY,
ZFS_TYPE_POOL, "<size>", "CAP");
zprop_register_number(ZPOOL_PROP_GUID, "guid", 0, PROP_READONLY,