summaryrefslogtreecommitdiff
path: root/usr/src/man/man3nsl/getpublickey.3nsl
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2011-03-14 14:05:30 -0400
committerRichard Lowe <richlowe@richlowe.net>2011-03-14 14:05:30 -0400
commitc10c16dec587a0662068f6e2991c29ed3a9db943 (patch)
treef414286f4bba41d75683ed4fbbaa6bfa4bf7fabd /usr/src/man/man3nsl/getpublickey.3nsl
parent68caef18a23a498d9e3017b983562c0f4fd8ab23 (diff)
downloadillumos-joyent-c10c16dec587a0662068f6e2991c29ed3a9db943.tar.gz
243 system manual pages should live with the software
Reviewed by: garrett@nexenta.com Reviewed by: gwr@nexenta.com Reviewed by: trisk@opensolaris.org Approved by: gwr@nexenta.com --HG-- extra : rebase_source : 0c599d0bec0dc8865fbba67721a7a6cd6b1feefb
Diffstat (limited to 'usr/src/man/man3nsl/getpublickey.3nsl')
-rw-r--r--usr/src/man/man3nsl/getpublickey.3nsl93
1 files changed, 93 insertions, 0 deletions
diff --git a/usr/src/man/man3nsl/getpublickey.3nsl b/usr/src/man/man3nsl/getpublickey.3nsl
new file mode 100644
index 0000000000..9d1be8e5ff
--- /dev/null
+++ b/usr/src/man/man3nsl/getpublickey.3nsl
@@ -0,0 +1,93 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (C) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH getpublickey 3NSL "10 Nov 2005" "SunOS 5.11" "Networking Services Library Functions"
+.SH NAME
+getpublickey, getsecretkey, publickey \- retrieve public or secret key
+.SH SYNOPSIS
+.LP
+.nf
+#include <rpc/rpc.h>
+#include <rpc/key_prot.h>
+
+\fBint\fR \fBgetpublickey\fR(\fBconst char\fR \fInetname[MAXNETNAMELEN]\fR,
+ \fBchar\fR \fIpublickey[HEXKEYBYTES+1]\fR);
+.fi
+
+.LP
+.nf
+\fBint\fR \fBgetsecretkey\fR(\fBconst char\fR \fInetname[MAXNETNAMELEN]\fR,
+ \fBchar\fR \fIsecretkey[HEXKEYBYTES+1]\fR,\fBconst char *\fR\fIpasswd\fR);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBgetpublickey()\fR and \fBgetsecretkey()\fR functions get public and
+secret keys for \fInetname\fR. The key may come from one of the following
+sources:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fB/etc/publickey\fR file. See \fBpublickey\fR(4).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBNIS\fR map ``publickey.byname'' or the \fBNIS+\fR table ``cred.org_dir''.
+The sources and their lookup order are specified in the
+\fB/etc/nsswitch.conf\fR file. See \fBnsswitch.conf\fR(4).
+.RE
+.sp
+.LP
+\fBgetsecretkey()\fR has an extra argument, \fBpasswd\fR, which is used to
+decrypt the encrypted secret key stored in the database.
+.SH RETURN VALUES
+.sp
+.LP
+Both routines return \fB1\fR if they are successful in finding the key.
+Otherwise, the routines return \fB0\fR. The keys are returned as
+null-terminated, hexadecimal strings. If the password supplied to
+\fBgetsecretkey()\fR fails to decrypt the secret key, the routine will return 1
+but the \fIsecretkey\fR [0] will be set to \fINULL\fR.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+MT-LevelSafe
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsecure_rpc\fR(3NSL), \fBnsswitch.conf\fR(4), \fBpublickey\fR(4),
+\fBattributes\fR(5)
+.SH WARNINGS
+.sp
+.LP
+If \fBgetpublickey()\fR gets the public key from any source other than NIS+,
+all authenticated NIS+ operations may fail. To ensure that this does not
+happen, edit the \fBnsswitch.conf\fR(4) file to make sure that the public key
+is obtained from NIS+.
+.SS "NOTES"
+.sp
+.LP
+NIS+ might not be supported in future releases of the Solaris operating system.
+Tools to aid the migration from NIS+ to LDAP are available in the current
+Solaris release. For more information, visit
+http://www.sun.com/directory/nisplus/transition.html.