diff options
author | Theo Schlossnagle <jesus@omniti.com> | 2012-04-24 22:00:12 -0400 |
---|---|---|
committer | Theo Schlossnagle <jesus@omniti.com> | 2012-04-24 22:00:12 -0400 |
commit | 70f9559bd0c02885d84a425eaafc8c280df10efb (patch) | |
tree | 8e941ecc2999c6850276e61ac528dabfa5ff920f /usr/src/lib/libpkg/common | |
parent | d0bf2cb9f5d040c9eb24954ea34580b402377300 (diff) | |
download | illumos-gate-70f9559bd0c02885d84a425eaafc8c280df10efb.tar.gz |
1665 Illumos wont build against openssl 1.0.0
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Approved by: Albert Lee <trisk@nexenta.com>
Diffstat (limited to 'usr/src/lib/libpkg/common')
-rw-r--r-- | usr/src/lib/libpkg/common/p12lib.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/usr/src/lib/libpkg/common/p12lib.c b/usr/src/lib/libpkg/common/p12lib.c index 3ae72a4b50..238aa57d54 100644 --- a/usr/src/lib/libpkg/common/p12lib.c +++ b/usr/src/lib/libpkg/common/p12lib.c @@ -58,6 +58,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2012, OmniTI Computer Consulting, Inc. All rights reserved. + */ + #include <strings.h> #include <stdlib.h> @@ -1137,7 +1141,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); @@ -2295,7 +2303,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); } |