diff options
author | Alexander Pyhalov <apyhalov@gmail.com> | 2014-05-15 10:28:03 +0400 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2014-05-19 07:55:53 -0700 |
commit | a65cd518c5d0f30c53594a7022eb0f7d04c98cef (patch) | |
tree | 3fd8815f466051e2274f7d101fd52885606a4366 | |
parent | 60b43c45a204a6c0651e8017e1e505015ba74094 (diff) | |
download | illumos-joyent-a65cd518c5d0f30c53594a7022eb0f7d04c98cef.tar.gz |
4853 illumos-gate is not lint-clean when built with openssl 1.0
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>
Reviewed by: Alexander Eremin <alexander.eremin@nexenta.com>
Approved by: Robert Mustacchi <rm@joyent.com>
21 files changed, 70 insertions, 50 deletions
diff --git a/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/Makefile b/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/Makefile index e93209c9b6..5c96a2fbfc 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/Makefile @@ -25,9 +25,14 @@ include ../Makefile.com PROG= p12split -LDLIBS += -lwanboot -linetutil -lwanbootutil -lcrypto +LDLIBS += -lwanboot -linetutil -lwanbootutil CPPFLAGS += -I$(CMNCRYPTDIR) +# libcrypto has no lint library, so we can only include this while building +$(PROG) := LDLIBS += -lcrypto + +LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 + all: $(PROG) install: all $(ROOTCMD) diff --git a/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/p12split.c b/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/p12split.c index 600f7ffd33..5716224bdc 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/p12split.c +++ b/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/p12split.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <libintl.h> #include <locale.h> @@ -262,7 +260,6 @@ do_certs(void) int i; for (i = 0; i < sk_X509_num(ta_in); i++) { - /* LINTED */ x = sk_X509_value(ta_in, i); (void) printf( gettext("\nTrust Anchor cert %d:\n"), i); @@ -287,7 +284,7 @@ do_certs(void) } (void) sunw_print_times(stdout, PRNT_BOTH, - NULL, x); + NULL, x); } } } @@ -376,13 +373,11 @@ check_certs(STACK_OF(X509) *ta_in, X509 **c_in) return; for (i = 0; i < sk_X509_num(ta_in); ) { - /* LINTED */ curr = sk_X509_value(ta_in, i); ret = time_check_print(curr); if ((ret != CHK_TIME_OK && ret != CHK_TIME_IS_BEFORE) && del_expired) { (void) fprintf(stderr, gettext(" Removing cert\n")); - /* LINTED */ curr = sk_X509_delete(ta_in, i); X509_free(curr); continue; @@ -586,14 +581,12 @@ cleanup: */ if (clist != NULL) { if (cert != NULL && sk_X509_num(clist) == 1) { - /* LINTED */ (void) sk_X509_delete(clist, 0); } sk_X509_pop_free(clist, X509_free); } if (klist != NULL) { if (pkey != NULL && sk_EVP_PKEY_num(klist) == 1) { - /* LINTED */ (void) sk_EVP_PKEY_delete(klist, 0); } sk_EVP_PKEY_pop_free(klist, sunw_evp_pkey_free); diff --git a/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/Makefile b/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/Makefile index f4a1f548b7..6945cde82f 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/Makefile +++ b/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/Makefile @@ -25,9 +25,12 @@ include ../Makefile.com PROG = wanboot-cgi -LDLIBS += -lgen -lnsl -lwanbootutil -lnvpair -lwanboot -lcrypto +LDLIBS += -lgen -lnsl -lwanbootutil -lnvpair -lwanboot CPPFLAGS += -I$(CMNCRYPTDIR) +# libcrypto has no lint library, so we can only include this while building +$(PROG) := LDLIBS += -lcrypto + all: $(PROG) install: all $(ROOTCMD) diff --git a/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/wanboot-cgi.c b/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/wanboot-cgi.c index c8f391031a..1f956eb683 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/wanboot-cgi.c +++ b/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/wanboot-cgi.c @@ -877,7 +877,6 @@ build_trustfile(const char *path, void *truststorepath) * Merge the two stacks of pkcs12 certs. */ for (i = 0; i < sk_X509_num(i_anchors); i++) { - /* LINTED */ x = sk_X509_delete(i_anchors, i); (void) sk_X509_push(o_anchors, x); } @@ -1090,7 +1089,6 @@ get_hostnames(const char *path, void *nvl) p12 = NULL; for (i = 0; i < sk_X509_num(certs); i++) { - /* LINTED */ x = sk_X509_value(certs, i); if (!one_name(sunw_issuer_attrs(x, buf, sizeof (buf) - 1), nvl)) { diff --git a/usr/src/cmd/ssh/libssh/Makefile.com b/usr/src/cmd/ssh/libssh/Makefile.com index 569afe7207..a3eee2a21d 100644 --- a/usr/src/cmd/ssh/libssh/Makefile.com +++ b/usr/src/cmd/ssh/libssh/Makefile.com @@ -94,7 +94,7 @@ LIBS = $(LIBRARY) $(LINTLIB) # Define LDLIBS conditionally for lintcheck, rather than in general, since # we're building an archive library which itself links to nothing, we just # want lint to know about these libraries. -lintcheck := LDLIBS += -lcrypto -lz -lsocket -lnsl -lc +lintcheck := LDLIBS += -lz -lsocket -lnsl -lc $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) POFILE_DIR = ../.. diff --git a/usr/src/cmd/ssh/sftp-server/Makefile b/usr/src/cmd/ssh/sftp-server/Makefile index c2bdf26c1e..aadf954ce2 100644 --- a/usr/src/cmd/ssh/sftp-server/Makefile +++ b/usr/src/cmd/ssh/sftp-server/Makefile @@ -31,7 +31,10 @@ SRCS = $(OBJS:.o=.c) include ../../Makefile.cmd include ../Makefile.ssh-common -LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket -lcrypto +LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket + +# libcrypto has no lint library, so we can only use it when building +$(PROG) := LDLIBS += -lcrypto POFILE_DIR = .. diff --git a/usr/src/cmd/ssh/sftp/Makefile b/usr/src/cmd/ssh/sftp/Makefile index 8bd8bb4ac3..9a2a4ff140 100644 --- a/usr/src/cmd/ssh/sftp/Makefile +++ b/usr/src/cmd/ssh/sftp/Makefile @@ -35,7 +35,10 @@ SRCS = $(OBJS:.o=.c) include ../../Makefile.cmd include ../Makefile.ssh-common -LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket -lcrypto -ltecla +LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket -ltecla + +# libcrypto has no lint library, so we can only use it when building +$(PROG) := LDLIBS += -lcrypto POFILE_DIR = .. diff --git a/usr/src/cmd/ssh/ssh-add/Makefile b/usr/src/cmd/ssh/ssh-add/Makefile index 1fb132f741..a8ac9ebe52 100644 --- a/usr/src/cmd/ssh/ssh-add/Makefile +++ b/usr/src/cmd/ssh/ssh-add/Makefile @@ -32,7 +32,10 @@ SRCS = $(OBJS:.o=.c) include ../../Makefile.cmd include ../Makefile.ssh-common -LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket -lcrypto +LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket + +# libcrypto has no lint library, so we can only use it when building +$(PROG) := LDLIBS += -lcrypto POFILE_DIR= .. diff --git a/usr/src/cmd/ssh/ssh-agent/Makefile b/usr/src/cmd/ssh/ssh-agent/Makefile index 3d4a366c17..45af352079 100644 --- a/usr/src/cmd/ssh/ssh-agent/Makefile +++ b/usr/src/cmd/ssh/ssh-agent/Makefile @@ -32,7 +32,10 @@ SRCS = $(OBJS:.o=.c) include ../../Makefile.cmd include ../Makefile.ssh-common -LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket -lcrypto +LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket + +# libcrypto has no lint library, so we can only use it when building +$(PROG) := LDLIBS += -lcrypto POFILE_DIR= .. diff --git a/usr/src/cmd/ssh/ssh-keygen/Makefile b/usr/src/cmd/ssh/ssh-keygen/Makefile index f92c437045..673fd361b4 100644 --- a/usr/src/cmd/ssh/ssh-keygen/Makefile +++ b/usr/src/cmd/ssh/ssh-keygen/Makefile @@ -32,7 +32,10 @@ SRCS = $(OBJS:.o=.c) include ../../Makefile.cmd include ../Makefile.ssh-common -LDLIBS += $(SSH_COMMON_LDLIBS) -lcrypto -lsocket +LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket + +# libcrypto has no lint library, so we can only use it when building +$(PROG) := LDLIBS += -lcrypto POFILE_DIR= .. diff --git a/usr/src/cmd/ssh/ssh-keyscan/Makefile b/usr/src/cmd/ssh/ssh-keyscan/Makefile index 9e2fd17160..1aebfa4412 100644 --- a/usr/src/cmd/ssh/ssh-keyscan/Makefile +++ b/usr/src/cmd/ssh/ssh-keyscan/Makefile @@ -32,7 +32,10 @@ SRCS = $(OBJS:.o=.c) include ../../Makefile.cmd include ../Makefile.ssh-common -LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket -lnsl -lz -lcrypto +LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket -lnsl -lz + +# libcrypto has no lint library, so we can only use it when building +$(PROG) := LDLIBS += -lcrypto POFILE_DIR= .. diff --git a/usr/src/cmd/ssh/ssh-keysign/Makefile b/usr/src/cmd/ssh/ssh-keysign/Makefile index e31ae681a1..27abd1bfbc 100644 --- a/usr/src/cmd/ssh/ssh-keysign/Makefile +++ b/usr/src/cmd/ssh/ssh-keysign/Makefile @@ -36,7 +36,10 @@ include ../Makefile.ssh-common FILEMODE= 04555 -LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket -lnsl -lz -lcrypto +LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket -lnsl -lz + +# libcrypto has no lint library, so we can only use it when building +$(PROG) := LDLIBS += -lcrypto POFILE_DIR= .. diff --git a/usr/src/cmd/ssh/ssh/Makefile b/usr/src/cmd/ssh/ssh/Makefile index 7bdd4f6be5..a53795f4c1 100644 --- a/usr/src/cmd/ssh/ssh/Makefile +++ b/usr/src/cmd/ssh/ssh/Makefile @@ -40,9 +40,11 @@ include ../Makefile.ssh-common LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket \ -lnsl \ -lz \ - -lcrypto \ -lgss +# libcrypto has no lint library, so we can only use it when building +$(PROG) := LDLIBS += -lcrypto + POFILE_DIR= .. .KEEP_STATE: diff --git a/usr/src/cmd/ssh/sshd/Makefile b/usr/src/cmd/ssh/sshd/Makefile index a52e9b1cc8..089f155568 100644 --- a/usr/src/cmd/ssh/sshd/Makefile +++ b/usr/src/cmd/ssh/sshd/Makefile @@ -75,12 +75,14 @@ LDLIBS += $(SSH_COMMON_LDLIBS) -lsocket \ -lpam \ -lbsm \ -lwrap \ - -lcrypto \ -lgss \ -lcontract MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) LDFLAGS += $(MAPFILES:%=-M%) +# libcrypto has no lint library, so we can only use it when building +$(PROG) := LDLIBS += -lcrypto + POFILE_DIR= .. .KEEP_STATE: diff --git a/usr/src/common/net/wanboot/boot_http.c b/usr/src/common/net/wanboot/boot_http.c index 737f49a8aa..26590369cd 100644 --- a/usr/src/common/net/wanboot/boot_http.c +++ b/usr/src/common/net/wanboot/boot_http.c @@ -2254,7 +2254,6 @@ print_ciphers(SSL *ssl) return; for (i = 0; i < sk_SSL_CIPHER_num(sk); i++) { - /* LINTED */ c = sk_SSL_CIPHER_value(sk, i); libbootlog(BOOTLOG_VERBOSE, "%08lx %s", c->id, c->name); } diff --git a/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com b/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com index 76ecd38479..a27fa16cc6 100644 --- a/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com +++ b/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com @@ -40,8 +40,8 @@ BERLIB64= $(BERLIB) OPENSSLLIBS= $(BERLIB) -lcrypto -lcryptoutil -lc OPENSSLLIBS64= $(BERLIB64) -lcrypto -lcryptoutil -lc -LINTSSLLIBS = $(BERLIB) -lcrypto -lcryptoutil -lc -LINTSSLLIBS64 = $(BERLIB64) -lcrypto -lcryptoutil -lc +LINTSSLLIBS = $(BERLIB) -lcryptoutil -lc +LINTSSLLIBS64 = $(BERLIB64) -lcryptoutil -lc SRCDIR= ../common INCDIR= ../../include diff --git a/usr/src/lib/libkmf/plugins/kmf_openssl/common/openssl_spi.c b/usr/src/lib/libkmf/plugins/kmf_openssl/common/openssl_spi.c index fc3da4b7e8..19d757df90 100644 --- a/usr/src/lib/libkmf/plugins/kmf_openssl/common/openssl_spi.c +++ b/usr/src/lib/libkmf/plugins/kmf_openssl/common/openssl_spi.c @@ -2033,7 +2033,7 @@ OpenSSL_CertGetPrintable(KMF_HANDLE_T handle, const KMF_DATA *pcert, #if OPENSSL_VERSION_NUMBER < 0x10000000L STACK *emlst = NULL; #else - STACK_OF(OPENSSL_STRING) *emlst = NULL; + STACK_OF(OPENSSL_STRING) *emlst = NULL; #endif X509_EXTENSION *ex; X509_CINF *ci; @@ -2153,7 +2153,7 @@ OpenSSL_CertGetPrintable(KMF_HANDLE_T handle, const KMF_DATA *pcert, #else for (j = 0; j < sk_OPENSSL_STRING_num(emlst); j++) (void) BIO_printf(mem, "%s\n", - sk_OPENSSL_STRING_value(emlst, j)); + sk_OPENSSL_STRING_value(emlst, j)); #endif len = BIO_gets(mem, resultStr, KMF_CERT_PRINTABLE_LEN); @@ -2499,7 +2499,6 @@ static X509 *ocsp_find_signer_sk(STACK_OF(X509) *certs, OCSP_RESPID *id) keyhash = id->value.byKey->data; /* Calculate hash of each key and compare */ for (i = 0; i < sk_X509_num(certs); i++) { - /* LINTED E_BAD_PTR_CAST_ALIGN */ X509 *x = sk_X509_value(certs, i); /* Use pubkey_digest to get the key ID value */ (void) X509_pubkey_digest(x, EVP_sha1(), tmphash, NULL); @@ -3639,7 +3638,6 @@ extract_pem(KMF_HANDLE *kmfh, } for (i = 0; i < sk_X509_INFO_num(x509_info_stack); i++) { - /* LINTED E_BAD_PTR_CAST_ALIGN */ cert_infos[ncerts] = sk_X509_INFO_value(x509_info_stack, i); ncerts++; } @@ -3721,7 +3719,6 @@ extract_pem(KMF_HANDLE *kmfh, err: /* Cleanup the stack of X509 info records */ for (i = 0; i < sk_X509_INFO_num(x509_info_stack); i++) { - /* LINTED E_BAD_PTR_CAST_ALIGN */ info = (X509_INFO *)sk_X509_INFO_value(x509_info_stack, i); X509_INFO_free(info); } @@ -3742,7 +3739,6 @@ openssl_parse_bags(STACK_OF(PKCS12_SAFEBAG) *bags, char *pin, int i; for (i = 0; i < sk_PKCS12_SAFEBAG_num(bags); i++) { - /* LINTED E_BAD_PTR_CAST_ALIGN */ PKCS12_SAFEBAG *bag = sk_PKCS12_SAFEBAG_value(bags, i); ret = openssl_parse_bag(bag, pin, (pin ? strlen(pin) : 0), keys, certs); @@ -3773,12 +3769,10 @@ set_pkey_attrib(EVP_PKEY *pkey, ASN1_TYPE *attrib, int nid) X509_ATTRIBUTE *a; for (i = 0; i < sk_X509_ATTRIBUTE_num(pkey->attributes); i++) { - /* LINTED E_BAD_PTR_CASE_ALIGN */ a = sk_X509_ATTRIBUTE_value(pkey->attributes, i); if (OBJ_obj2nid(a->object) == nid) { X509_ATTRIBUTE_free(a); - /* LINTED E_BAD_PTR_CAST_ALIGN */ - sk_X509_ATTRIBUTE_set(pkey->attributes, + (void) sk_X509_ATTRIBUTE_set(pkey->attributes, i, attr); return (KMF_OK); } @@ -3955,7 +3949,6 @@ openssl_pkcs12_parse(PKCS12 *p12, char *pin, for (i = 0; ret == KMF_OK && i < sk_PKCS7_num(asafes); i++) { bags = NULL; - /* LINTED E_BAD_PTR_CAST_ALIGN */ p7 = sk_PKCS7_value(asafes, i); bagnid = OBJ_obj2nid(p7->type); @@ -4233,7 +4226,6 @@ find_attr(STACK_OF(X509_ATTRIBUTE) *attrs, int nid) return (NULL); for (i = 0; i < sk_X509_ATTRIBUTE_num(attrs); i++) { - /* LINTED E_BAD_PTR_CAST_ALIGN */ a = sk_X509_ATTRIBUTE_value(attrs, i); if (OBJ_obj2nid(a->object) == nid) return (a); @@ -4274,7 +4266,6 @@ convertToRawKey(EVP_PKEY *pkey, KMF_RAW_KEY_DATA *key) ASN1_TYPE *ty = NULL; int numattr = sk_ASN1_TYPE_num(attr->value.set); if (attr->single == 0 && numattr > 0) { - /* LINTED E_BAD_PTR_CAST_ALIGN */ ty = sk_ASN1_TYPE_value(attr->value.set, 0); } if (ty != NULL) { @@ -4298,7 +4289,6 @@ convertToRawKey(EVP_PKEY *pkey, KMF_RAW_KEY_DATA *key) ASN1_TYPE *ty = NULL; int numattr = sk_ASN1_TYPE_num(attr->value.set); if (attr->single == 0 && numattr > 0) { - /* LINTED E_BAD_PTR_CAST_ALIGN */ ty = sk_ASN1_TYPE_value(attr->value.set, 0); } key->id.Data = (uchar_t *)malloc( @@ -4329,7 +4319,6 @@ convertPK12Objects( int i; for (i = 0; sslkeys != NULL && i < sk_EVP_PKEY_num(sslkeys); i++) { - /* LINTED E_BAD_PTR_CAST_ALIGN */ EVP_PKEY *pkey = sk_EVP_PKEY_value(sslkeys, i); rv = convertToRawKey(pkey, &key); if (rv == KMF_OK) @@ -4341,7 +4330,6 @@ convertPK12Objects( /* Now add the certificate to the certlist */ for (i = 0; sslcert != NULL && i < sk_X509_num(sslcert); i++) { - /* LINTED E_BAD_PTR_CAST_ALIGN */ X509 *cert = sk_X509_value(sslcert, i); rv = add_cert_to_list(kmfh, cert, certlist, ncerts); if (rv != KMF_OK) @@ -4357,7 +4345,6 @@ convertPK12Objects( * Lint is complaining about the embedded casting, and * to fix it, you need to fix openssl header files. */ - /* LINTED E_BAD_PTR_CAST_ALIGN */ c = sk_X509_value(sslcacerts, i); /* Now add the ca cert to the certlist */ @@ -5424,7 +5411,6 @@ OpenSSL_FindCertInCRL(KMF_HANDLE_T handle, int numattr, KMF_ATTRIBUTE *attrlist) } for (i = 0; i < sk_X509_REVOKED_num(revoke_stack); i++) { - /* LINTED E_BAD_PTR_CAST_ALIGN */ revoke = sk_X509_REVOKED_value(revoke_stack, i); if (ASN1_INTEGER_cmp(xcert->cert_info->serialNumber, revoke->serialNumber) == 0) { diff --git a/usr/src/lib/libpkg/Makefile.com b/usr/src/lib/libpkg/Makefile.com index 8f56a61423..50f8dcd6e7 100644 --- a/usr/src/lib/libpkg/Makefile.com +++ b/usr/src/lib/libpkg/Makefile.com @@ -64,7 +64,11 @@ $(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC) LIBS = $(DYNLIB) $(LINTLIB) -LDLIBS += -lc -lssl -lwanboot -lcrypto -lscf -ladm +LDLIBS += -lc -lwanboot -lscf -ladm + +# libcrypto and libssl have no lint library, and so can only be used when +# building +$(DYNLIB) := LDLIBS += -lcrypto -lssl CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-label diff --git a/usr/src/lib/libpkg/common/security.c b/usr/src/lib/libpkg/common/security.c index 9f2070c0c6..4210ba5c32 100644 --- a/usr/src/lib/libpkg/common/security.c +++ b/usr/src/lib/libpkg/common/security.c @@ -110,7 +110,6 @@ get_cert_chain(PKG_ERR *err, X509 *cert, STACK_OF(X509) *clcerts, /* add all ca certs into the store */ for (i = 0; i < sk_X509_num(cas); i++) { - /* LINTED pointer cast may result in improper alignment */ ca_cert = sk_X509_value(cas, i); if (X509_STORE_add_cert(ca_store, ca_cert) == 0) { pkgerr_add(err, PKGERR_NOMEM, gettext(ERR_MEM)); @@ -174,8 +173,7 @@ char NID_commonName, sname, ATTR_MAX) <= 0) { (void) strncpy(sname, - X509_NAME_oneline(xname, - NULL, 0), ATTR_MAX); + X509_NAME_oneline(xname, NULL, 0), ATTR_MAX); sname[ATTR_MAX - 1] = '\0'; } return (sname); @@ -205,8 +203,7 @@ char NID_commonName, sname, ATTR_MAX) <= 0) { (void) strncpy(sname, - X509_NAME_oneline(xname, - NULL, 0), ATTR_MAX); + X509_NAME_oneline(xname, NULL, 0), ATTR_MAX); sname[ATTR_MAX - 1] = '\0'; } return (sname); diff --git a/usr/src/lib/libwanboot/Makefile.com b/usr/src/lib/libwanboot/Makefile.com index ed69ec0b8a..7a96221c01 100644 --- a/usr/src/lib/libwanboot/Makefile.com +++ b/usr/src/lib/libwanboot/Makefile.com @@ -60,7 +60,12 @@ include ../../Makefile.lib LIBS += $(LINTLIB) LDLIBS += -lnvpair -lresolv -lnsl -lsocket -ldevinfo -ldhcputil \ - -linetutil -lc -lcrypto -lssl + -linetutil -lc + +# libcrypto and libssl have no lint library, so we can only use it when +# building +$(DYNLIB) := LDLIBS += -lcrypto -lssl + CPPFLAGS = -I$(SRC)/common/net/wanboot/crypt $(CPPFLAGS.master) CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses diff --git a/usr/src/lib/pkcs11/pkcs11_tpm/Makefile.com b/usr/src/lib/pkcs11/pkcs11_tpm/Makefile.com index 020051c977..3683677c22 100644 --- a/usr/src/lib/pkcs11/pkcs11_tpm/Makefile.com +++ b/usr/src/lib/pkcs11/pkcs11_tpm/Makefile.com @@ -73,7 +73,12 @@ TSSLIB=-L$(TSPILIBDIR) TSSLIB64=-L$(TSPILIBDIR)/$(MACH64) TSSINC=-I$(TSPIINCDIR) -LDLIBS += $(TSSLIB) -L$(ADJUNCT_PROTO)/lib -lc -luuid -lmd -ltspi -lcrypto +LDLIBS += $(TSSLIB) -L$(ADJUNCT_PROTO)/lib -lc -luuid -lmd -ltspi + +# libcrypto has no lint library, so we can only use it when +# building +$(LIBS) := LDLIBS += -lcrypto + CPPFLAGS += -xCC -D_POSIX_PTHREAD_SEMANTICS $(TSSINC) CPPFLAGS64 += $(CPPFLAGS) C99MODE= $(C99_ENABLE) |