Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/agc-netpgp-standalone]: src/crypto/external/bsd/netpgp/dist/src/libverif...



details:   https://anonhg.NetBSD.org/src/rev/127863e468f0
branches:  agc-netpgp-standalone
changeset: 777814:127863e468f0
user:      agc <agc%NetBSD.org@localhost>
date:      Sat Oct 20 06:01:57 2012 +0000

description:
document pgpv_get_verified(), which returns data and size of verified
data.

diffstat:

 crypto/external/bsd/netpgp/dist/src/libverify/libnetpgpverify.3 |  21 +++++++--
 1 files changed, 15 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r 33e77e3ffaf5 -r 127863e468f0 crypto/external/bsd/netpgp/dist/src/libverify/libnetpgpverify.3
--- a/crypto/external/bsd/netpgp/dist/src/libverify/libnetpgpverify.3   Sat Oct 20 05:55:42 2012 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/libverify/libnetpgpverify.3   Sat Oct 20 06:01:57 2012 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: libnetpgpverify.3,v 1.1.2.2 2012/10/20 04:59:53 agc Exp $
+.\" $NetBSD: libnetpgpverify.3,v 1.1.2.3 2012/10/20 06:01:57 agc Exp $
 .\"
 .\" Copyright (c) 2012 Alistair Crooks <agc%NetBSD.org@localhost>
 .\" All rights reserved.
@@ -23,7 +23,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd September 28, 2012
+.Dd October 20, 2012
 .Dt LIBNETPGPVERIFY 3
 .Os
 .Sh NAME
@@ -41,9 +41,9 @@
 .Fo pgpv_verify
 .Fa "pgpv_cursor_t *cursor" "pgpv_t *pgp" "const void *ptr" "ssize_t size"
 .Fc
-.Ft int
-.Fo pgpv_verify_print
-.Fa "pgpv_cursor_t *cursor"
+.Ft size_t
+.Fo pgpv_get_verified
+.Fa "pgpv_cursor_t *cursor" "unsigned entry" "char **ret"
 .Fc
 .Ft size_t
 .Fo pgpv_get_entry
@@ -95,8 +95,17 @@
 Occasionally, the memory or contents of the file which matched the signature
 will be needed, rather than a boolean value of whether it was verified.
 To do this, the
-.Fn pgpv_verify_print
+.Fn pgpv_get_verified
 function is used.
+Arguments to
+.Fn pgpv_get_verified
+are the entry number of the verification, and the returned data and its size.
+If an error occurs, or the signature is not verified, a zero value is returned
+for the size.
+.Nm
+stores the starts of the data of all verified matches, and so the entry
+number argument is the index of the occurrence of verification.
+The first match will have an entry number of 0, the second 1, and so on.
 .Pp
 The
 .Fn pgpv_close



Home | Main Index | Thread Index | Old Index