summaryrefslogtreecommitdiff
path: root/usr/src/lib/libcryptoutil/common
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@nexenta.com>2010-09-12 10:25:50 -0700
committerGarrett D'Amore <garrett@nexenta.com>2010-09-12 10:25:50 -0700
commit6ea3c0609e50782557505b88bb391b786bca32c9 (patch)
treee5aa493b37991b2e12f8cdbeca325b8ab1c39c3f /usr/src/lib/libcryptoutil/common
parentfe4be5acd083aa938dc37365d54b7fc4c0544d43 (diff)
downloadillumos-joyent-6ea3c0609e50782557505b88bb391b786bca32c9.tar.gz
6 Need open kcfd
Reviewed by: gwr@nexenta.com, richlowe@richlowe.net, matt@greenviolet.net Approved by: richlowe@richlowe.net
Diffstat (limited to 'usr/src/lib/libcryptoutil/common')
-rw-r--r--usr/src/lib/libcryptoutil/common/config_parsing.c62
-rw-r--r--usr/src/lib/libcryptoutil/common/cryptoutil.h5
-rw-r--r--usr/src/lib/libcryptoutil/common/mapfile-vers1
3 files changed, 3 insertions, 65 deletions
diff --git a/usr/src/lib/libcryptoutil/common/config_parsing.c b/usr/src/lib/libcryptoutil/common/config_parsing.c
index b2c8f7f05a..83e5cd9a3f 100644
--- a/usr/src/lib/libcryptoutil/common/config_parsing.c
+++ b/usr/src/lib/libcryptoutil/common/config_parsing.c
@@ -599,65 +599,3 @@ is_fips(char *name)
return (B_FALSE);
}
}
-
-CK_RV
-get_fips_mode(int *mode)
-{
- FILE *pfile = NULL;
- char buffer[BUFSIZ];
- int len;
- CK_RV rc = CKR_OK;
- int found = 0;
- char *token1;
- boolean_t fips_mode = B_FALSE;
-
- if ((pfile = fopen(_PATH_PKCS11_CONF, "r")) == NULL) {
- cryptoerror(LOG_DEBUG,
- "failed to open the pkcs11.conf file for read only.");
- *mode = CRYPTO_FIPS_MODE_DISABLED;
- return (CKR_OK);
- }
-
- while (fgets(buffer, BUFSIZ, pfile) != NULL) {
- if (buffer[0] == '#' || buffer[0] == ' ' ||
- buffer[0] == '\n'|| buffer[0] == '\t') {
- continue; /* ignore comment lines */
- }
-
- len = strlen(buffer);
- if (buffer[len - 1] == '\n') { /* get rid of trailing '\n' */
- len--;
- }
- buffer[len] = '\0';
-
- /* Get provider name */
- if ((token1 = strtok(buffer, SEP_COLON)) ==
- NULL) { /* buf is NULL */
- return (CKR_FUNCTION_FAILED);
- };
-
- if (is_fips(token1)) {
- if ((rc = parse_fips_mode(buffer + strlen(token1) + 1,
- &fips_mode)) != CKR_OK) {
- goto out;
- } else {
- found++;
- if (fips_mode == B_TRUE)
- *mode = CRYPTO_FIPS_MODE_ENABLED;
- else
- *mode = CRYPTO_FIPS_MODE_DISABLED;
- break;
- }
- } else {
- continue;
- }
- }
-
- if (!found) {
- *mode = CRYPTO_FIPS_MODE_DISABLED;
- }
-
-out:
- (void) fclose(pfile);
- return (rc);
-}
diff --git a/usr/src/lib/libcryptoutil/common/cryptoutil.h b/usr/src/lib/libcryptoutil/common/cryptoutil.h
index cca77d3f87..b5aad833f7 100644
--- a/usr/src/lib/libcryptoutil/common/cryptoutil.h
+++ b/usr/src/lib/libcryptoutil/common/cryptoutil.h
@@ -20,6 +20,9 @@
*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
*/
+/*
+ * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
+ */
#ifndef _CRYPTOUTIL_H
#define _CRYPTOUTIL_H
@@ -223,8 +226,6 @@ extern ssize_t readn_nointr(int fd, void *dbuf, size_t dlen);
extern ssize_t writen_nointr(int fd, void *dbuf, size_t dlen);
extern int update_conf(char *conf_file, char *entry);
-extern CK_RV get_fips_mode(int *);
-
extern int pkcs11_parse_uri(const char *str, pkcs11_uri_t *uri);
extern void pkcs11_free_uri(pkcs11_uri_t *uri);
diff --git a/usr/src/lib/libcryptoutil/common/mapfile-vers b/usr/src/lib/libcryptoutil/common/mapfile-vers
index 0c99085fc3..5d3c214b55 100644
--- a/usr/src/lib/libcryptoutil/common/mapfile-vers
+++ b/usr/src/lib/libcryptoutil/common/mapfile-vers
@@ -49,7 +49,6 @@ SYMBOL_VERSION SUNWprivate {
free_uentrylist;
free_umechlist;
getent_uef;
- get_fips_mode;
get_fullpath;
get_metaslot_info;
get_pkcs11conf_info;