Source-Changes-HG archive

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

[src/trunk]: src/crypto/external/bsd/netpgp/dist/bindings/perl refresh the pe...



details:   https://anonhg.NetBSD.org/src/rev/f35cb61c81f8
branches:  trunk
changeset: 754344:f35cb61c81f8
user:      agc <agc%NetBSD.org@localhost>
date:      Wed Apr 28 14:01:27 2010 +0000

description:
refresh the perl bindings to catch up with the changes in the library

diffstat:

 crypto/external/bsd/netpgp/dist/bindings/perl/Makefile          |    3 +-
 crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.h          |   24 +-
 crypto/external/bsd/netpgp/dist/bindings/perl/netpgpperl.pm     |    9 +-
 crypto/external/bsd/netpgp/dist/bindings/perl/netpgpperl_wrap.c |  517 +++++++++-
 4 files changed, 518 insertions(+), 35 deletions(-)

diffs (truncated from 756 to 300 lines):

diff -r eb7e5309c8b8 -r f35cb61c81f8 crypto/external/bsd/netpgp/dist/bindings/perl/Makefile
--- a/crypto/external/bsd/netpgp/dist/bindings/perl/Makefile    Wed Apr 28 13:51:55 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/bindings/perl/Makefile    Wed Apr 28 14:01:27 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2009/12/01 20:44:50 agc Exp $
+# $NetBSD: Makefile,v 1.3 2010/04/28 14:01:27 agc Exp $
 # Automatically generated by swigit wrapper script
 
 PREFIX=/usr/pkg
@@ -7,6 +7,7 @@
 SRCS=netpgpperl_wrap.c
 WARNS=0
 MKMAN=no
+MKLINT=no
 CPPFLAGS+=-I${PREFIX}/include
 CPPFLAGS+=-I/usr/pkg/lib/perl5/5.10.0/i386-netbsd-thread-multi/CORE
 LDFLAGS+=-L${PREFIX}/lib
diff -r eb7e5309c8b8 -r f35cb61c81f8 crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.h
--- a/crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.h    Wed Apr 28 13:51:55 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.h    Wed Apr 28 14:01:27 2010 +0000
@@ -66,13 +66,17 @@
 /* variables */
 int netpgp_setvar(netpgp_t *, const char *, const char *);
 char *netpgp_getvar(netpgp_t *, const char *);
+int netpgp_incvar(netpgp_t *, const char *, const int);
+int netpgp_unsetvar(netpgp_t *, const char *);
+
+/* set home directory information */
+int netpgp_set_homedir(netpgp_t *, char *, const char *, const int);
 
 /* key management */
-int netpgp_list_keys(netpgp_t *);
-int netpgp_list_sigs(netpgp_t *, const char *);
+int netpgp_list_keys(netpgp_t *, const int);
 int netpgp_find_key(netpgp_t *, char *);
-char *netpgp_get_key(netpgp_t *, const char *);
-int netpgp_export_key(netpgp_t *, char *);
+char *netpgp_get_key(netpgp_t *, const char *, const char *);
+char *netpgp_export_key(netpgp_t *, char *);
 int netpgp_import_key(netpgp_t *, char *);
 int netpgp_generate_key(netpgp_t *, char *, int);
 
@@ -82,9 +86,17 @@
 int netpgp_sign_file(netpgp_t *, const char *, const char *, char *, int, int, int);
 int netpgp_verify_file(netpgp_t *, const char *, const char *, int);
 
-/* memory signing */
+/* memory signing and encryption */
 int netpgp_sign_memory(netpgp_t *, const char *, char *, size_t, char *, size_t, const unsigned, const unsigned);
-int netpgp_verify_memory(netpgp_t *, const void *, const size_t, const int);
+int netpgp_verify_memory(netpgp_t *, const void *, const size_t, void *, size_t, const int);
+int netpgp_encrypt_memory(netpgp_t *, const char *, void *, const size_t, char *, size_t, int);
+int netpgp_decrypt_memory(netpgp_t *, const void *, const size_t, char *, size_t, const int);
+
+/* match and hkp-related functions */
+int netpgp_match_keys(netpgp_t *, char *, const char *, void *, const int);
+int netpgp_match_pubkeys(netpgp_t *, char *, void *);
+
+int netpgp_validate_sigs(netpgp_t *);
 
 __END_DECLS
 
diff -r eb7e5309c8b8 -r f35cb61c81f8 crypto/external/bsd/netpgp/dist/bindings/perl/netpgpperl.pm
--- a/crypto/external/bsd/netpgp/dist/bindings/perl/netpgpperl.pm       Wed Apr 28 13:51:55 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/bindings/perl/netpgpperl.pm       Wed Apr 28 14:01:27 2010 +0000
@@ -57,8 +57,10 @@
 *netpgp_list_packets = *netpgpperlc::netpgp_list_packets;
 *netpgp_setvar = *netpgpperlc::netpgp_setvar;
 *netpgp_getvar = *netpgpperlc::netpgp_getvar;
+*netpgp_incvar = *netpgpperlc::netpgp_incvar;
+*netpgp_unsetvar = *netpgpperlc::netpgp_unsetvar;
+*netpgp_set_homedir = *netpgpperlc::netpgp_set_homedir;
 *netpgp_list_keys = *netpgpperlc::netpgp_list_keys;
-*netpgp_list_sigs = *netpgpperlc::netpgp_list_sigs;
 *netpgp_find_key = *netpgpperlc::netpgp_find_key;
 *netpgp_get_key = *netpgpperlc::netpgp_get_key;
 *netpgp_export_key = *netpgpperlc::netpgp_export_key;
@@ -70,6 +72,11 @@
 *netpgp_verify_file = *netpgpperlc::netpgp_verify_file;
 *netpgp_sign_memory = *netpgpperlc::netpgp_sign_memory;
 *netpgp_verify_memory = *netpgpperlc::netpgp_verify_memory;
+*netpgp_encrypt_memory = *netpgpperlc::netpgp_encrypt_memory;
+*netpgp_decrypt_memory = *netpgpperlc::netpgp_decrypt_memory;
+*netpgp_match_keys = *netpgpperlc::netpgp_match_keys;
+*netpgp_match_pubkeys = *netpgpperlc::netpgp_match_pubkeys;
+*netpgp_validate_sigs = *netpgpperlc::netpgp_validate_sigs;
 
 ############# Class : netpgpperl::netpgp_t ##############
 
diff -r eb7e5309c8b8 -r f35cb61c81f8 crypto/external/bsd/netpgp/dist/bindings/perl/netpgpperl_wrap.c
--- a/crypto/external/bsd/netpgp/dist/bindings/perl/netpgpperl_wrap.c   Wed Apr 28 13:51:55 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/bindings/perl/netpgpperl_wrap.c   Wed Apr 28 14:01:27 2010 +0000
@@ -2635,35 +2635,56 @@
 }
 
 
-XS(_wrap_netpgp_list_keys) {
+XS(_wrap_netpgp_incvar) {
   {
     netpgp_t *arg1 = (netpgp_t *) 0 ;
+    char *arg2 = (char *) 0 ;
+    int arg3 ;
     int result;
     void *argp1 = 0 ;
     int res1 = 0 ;
+    int res2 ;
+    char *buf2 = 0 ;
+    int alloc2 = 0 ;
+    int val3 ;
+    int ecode3 = 0 ;
     int argvi = 0;
     dXSARGS;
     
-    if ((items < 1) || (items > 1)) {
-      SWIG_croak("Usage: netpgp_list_keys(netpgp_t *);");
+    if ((items < 3) || (items > 3)) {
+      SWIG_croak("Usage: netpgp_incvar(netpgp_t *,char const *,int const);");
     }
     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
     if (!SWIG_IsOK(res1)) {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_list_keys" "', argument " "1"" of type '" "netpgp_t *""'"); 
+      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_incvar" "', argument " "1"" of type '" "netpgp_t *""'"); 
     }
     arg1 = (netpgp_t *)(argp1);
-    result = (int)netpgp_list_keys(arg1);
+    res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_incvar" "', argument " "2"" of type '" "char const *""'");
+    }
+    arg2 = (char *)(buf2);
+    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
+    if (!SWIG_IsOK(ecode3)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_incvar" "', argument " "3"" of type '" "int""'");
+    } 
+    arg3 = (int)(val3);
+    result = (int)netpgp_incvar(arg1,(char const *)arg2,arg3);
     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
     
+    if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+    
     XSRETURN(argvi);
   fail:
     
+    if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+    
     SWIG_croak_null();
   }
 }
 
 
-XS(_wrap_netpgp_list_sigs) {
+XS(_wrap_netpgp_unsetvar) {
   {
     netpgp_t *arg1 = (netpgp_t *) 0 ;
     char *arg2 = (char *) 0 ;
@@ -2677,19 +2698,19 @@
     dXSARGS;
     
     if ((items < 2) || (items > 2)) {
-      SWIG_croak("Usage: netpgp_list_sigs(netpgp_t *,char const *);");
+      SWIG_croak("Usage: netpgp_unsetvar(netpgp_t *,char const *);");
     }
     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
     if (!SWIG_IsOK(res1)) {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_list_sigs" "', argument " "1"" of type '" "netpgp_t *""'"); 
+      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_unsetvar" "', argument " "1"" of type '" "netpgp_t *""'"); 
     }
     arg1 = (netpgp_t *)(argp1);
     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
     if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_list_sigs" "', argument " "2"" of type '" "char const *""'");
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_unsetvar" "', argument " "2"" of type '" "char const *""'");
     }
     arg2 = (char *)(buf2);
-    result = (int)netpgp_list_sigs(arg1,(char const *)arg2);
+    result = (int)netpgp_unsetvar(arg1,(char const *)arg2);
     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
     
     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
@@ -2702,6 +2723,104 @@
 }
 
 
+XS(_wrap_netpgp_set_homedir) {
+  {
+    netpgp_t *arg1 = (netpgp_t *) 0 ;
+    char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
+    int arg4 ;
+    int result;
+    void *argp1 = 0 ;
+    int res1 = 0 ;
+    int res2 ;
+    char *buf2 = 0 ;
+    int alloc2 = 0 ;
+    int res3 ;
+    char *buf3 = 0 ;
+    int alloc3 = 0 ;
+    int val4 ;
+    int ecode4 = 0 ;
+    int argvi = 0;
+    dXSARGS;
+    
+    if ((items < 4) || (items > 4)) {
+      SWIG_croak("Usage: netpgp_set_homedir(netpgp_t *,char *,char const *,int const);");
+    }
+    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
+    if (!SWIG_IsOK(res1)) {
+      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_set_homedir" "', argument " "1"" of type '" "netpgp_t *""'"); 
+    }
+    arg1 = (netpgp_t *)(argp1);
+    res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_set_homedir" "', argument " "2"" of type '" "char *""'");
+    }
+    arg2 = (char *)(buf2);
+    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
+    if (!SWIG_IsOK(res3)) {
+      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_set_homedir" "', argument " "3"" of type '" "char const *""'");
+    }
+    arg3 = (char *)(buf3);
+    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
+    if (!SWIG_IsOK(ecode4)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_set_homedir" "', argument " "4"" of type '" "int""'");
+    } 
+    arg4 = (int)(val4);
+    result = (int)netpgp_set_homedir(arg1,arg2,(char const *)arg3,arg4);
+    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
+    
+    if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+    if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+    
+    XSRETURN(argvi);
+  fail:
+    
+    if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+    if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+    
+    SWIG_croak_null();
+  }
+}
+
+
+XS(_wrap_netpgp_list_keys) {
+  {
+    netpgp_t *arg1 = (netpgp_t *) 0 ;
+    int arg2 ;
+    int result;
+    void *argp1 = 0 ;
+    int res1 = 0 ;
+    int val2 ;
+    int ecode2 = 0 ;
+    int argvi = 0;
+    dXSARGS;
+    
+    if ((items < 2) || (items > 2)) {
+      SWIG_croak("Usage: netpgp_list_keys(netpgp_t *,int const);");
+    }
+    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
+    if (!SWIG_IsOK(res1)) {
+      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_list_keys" "', argument " "1"" of type '" "netpgp_t *""'"); 
+    }
+    arg1 = (netpgp_t *)(argp1);
+    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
+    if (!SWIG_IsOK(ecode2)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "netpgp_list_keys" "', argument " "2"" of type '" "int""'");
+    } 
+    arg2 = (int)(val2);
+    result = (int)netpgp_list_keys(arg1,arg2);
+    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
+    
+    
+    XSRETURN(argvi);
+  fail:
+    
+    
+    SWIG_croak_null();
+  }
+}
+
+
 XS(_wrap_netpgp_find_key) {
   {
     netpgp_t *arg1 = (netpgp_t *) 0 ;
@@ -2745,17 +2864,21 @@
   {
     netpgp_t *arg1 = (netpgp_t *) 0 ;
     char *arg2 = (char *) 0 ;
+    char *arg3 = (char *) 0 ;
     char *result = 0 ;
     void *argp1 = 0 ;
     int res1 = 0 ;
     int res2 ;
     char *buf2 = 0 ;
     int alloc2 = 0 ;
+    int res3 ;
+    char *buf3 = 0 ;
+    int alloc3 = 0 ;
     int argvi = 0;
     dXSARGS;



Home | Main Index | Thread Index | Old Index