Mercurial > pidgin
annotate libpurple/plugins/perl/common/Certificate.xs @ 27913:25ad8f6b2638
merge of 'ce714031f3cafbcbd99cc3988cbb9cacd3ada236'
and 'f6ccaee21b84f421b31d614cb5c06c855ab47e0b'
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Fri, 14 Aug 2009 00:37:34 +0000 |
parents | 31f65046b92d |
children | 1bcedeb32bb4 |
rev | line source |
---|---|
23658
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
1 #include "module.h" |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
2 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
3 struct cb_data { |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
4 SV *cb; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
5 SV *user_data; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
6 }; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
7 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
8 static void cb_cert_verify(PurpleCertificateVerificationStatus st, struct cb_data *d) { |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
9 dSP; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
10 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
11 ENTER; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
12 SAVETMPS; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
13 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
14 PUSHMARK(SP); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
15 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
16 XPUSHs(sv_2mortal(newSViv(st))); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
17 XPUSHs(d->user_data); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
18 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
19 PUTBACK; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
20 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
21 call_sv(d->cb, G_VOID | G_EVAL); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
22 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
23 if(SvTRUE(ERRSV)) { |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
24 STRLEN l_a; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
25 purple_debug_warning("perl", "Failed to run 'certificate verify' callback: %s\n", SvPV(ERRSV, l_a)); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
26 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
27 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
28 FREETMPS; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
29 LEAVE; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
30 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
31 SvREFCNT_dec(d->cb); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
32 SvREFCNT_dec(d->user_data); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
33 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
34 g_free(d); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
35 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
36 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
37 MODULE = Purple::Certificate PACKAGE = Purple::Certificate PREFIX = purple_certificate_ |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
38 PROTOTYPES: ENABLE |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
39 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
40 BOOT: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
41 { |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
42 HV *stash = gv_stashpv("Purple::Certificate", 1); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
43 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
44 static const constiv *civ, const_iv[] = { |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
45 #define const_iv(name) {#name, (IV)PURPLE_CERTIFICATE_##name} |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
46 const_iv(INVALID), |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
47 const_iv(VALID), |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
48 }; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
49 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
50 for (civ = const_iv + sizeof(const_iv) / sizeof(const_iv[0]); civ-- > const_iv; ) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
51 newCONSTSUB(stash, (char *)civ->name, newSViv(civ->iv)); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
52 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
53 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
54 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
55 purple_certificate_add_ca_search_path(path) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
56 const char* path |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
57 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
58 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
59 purple_certificate_check_subject_name(crt, name) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
60 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
61 const gchar* name |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
62 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
63 Purple::Certificate |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
64 purple_certificate_copy(crt) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
65 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
66 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
67 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
68 purple_certificate_destroy(crt) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
69 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
70 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
71 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
72 purple_certificate_display_x509(crt) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
73 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
74 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
75 ## changed order of arguments, so that $cert->export($file) could be used |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
76 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
77 purple_certificate_export(crt, filename) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
78 const gchar* filename |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
79 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
80 C_ARGS: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
81 filename, crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
82 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
83 Purple::Certificate::Pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
84 purple_certificate_find_pool(scheme_name, pool_name) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
85 const gchar* scheme_name |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
86 const gchar* pool_name |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
87 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
88 Purple::Certificate::Scheme |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
89 purple_certificate_find_scheme(name) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
90 const gchar* name |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
91 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
92 Purple::Certificate::Verifier |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
93 purple_certificate_find_verifier(scheme_name, ver_name) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
94 const gchar* scheme_name |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
95 const gchar* ver_name |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
96 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
97 Purple::Handle |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
98 purple_certificate_get_handle() |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
99 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
100 gchar_own* |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
101 purple_certificate_get_issuer_unique_id(crt) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
102 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
103 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
104 gchar_own* |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
105 purple_certificate_get_subject_name(crt) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
106 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
107 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
108 gchar_own* |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
109 purple_certificate_get_unique_id(crt) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
110 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
111 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
112 Purple::Certificate |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
113 purple_certificate_import(scheme, filename) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
114 Purple::Certificate::Scheme scheme |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
115 const gchar* filename |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
116 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
117 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
118 purple_certificate_register_pool(pool) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
119 Purple::Certificate::Pool pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
120 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
121 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
122 purple_certificate_register_scheme(scheme) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
123 Purple::Certificate::Scheme scheme |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
124 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
125 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
126 purple_certificate_register_verifier(vr) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
127 Purple::Certificate::Verifier vr |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
128 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
129 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
130 purple_certificate_signed_by(crt, issuer) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
131 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
132 Purple::Certificate issuer |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
133 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
134 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
135 purple_certificate_unregister_pool(pool) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
136 Purple::Certificate::Pool pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
137 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
138 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
139 purple_certificate_unregister_scheme(scheme) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
140 Purple::Certificate::Scheme scheme |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
141 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
142 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
143 purple_certificate_unregister_verifier(vr) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
144 Purple::Certificate::Verifier vr |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
145 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
146 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
147 purple_certificate_verify_complete(vrq, st) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
148 Purple::Certificate::VerificationRequest vrq |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
149 Purple::Certificate::VerificationStatus st |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
150 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
151 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
152 purple_certificate_get_times(crt, OUTLIST time_t activation, OUTLIST time_t expiration) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
153 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
154 PROTOTYPE: $ |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
155 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
156 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
157 purple_certificate_destroy_list(...) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
158 PREINIT: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
159 GList* l = NULL; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
160 int i = 0; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
161 CODE: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
162 for(i = 0; i < items; i++) { /* PurpleCertificate */ |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
163 l = g_list_prepend(l, purple_perl_ref_object(ST(i))); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
164 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
165 purple_certificate_destroy_list(l); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
166 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
167 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
168 purple_certificate_get_pools() |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
169 PREINIT: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
170 GList *l; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
171 PPCODE: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
172 for(l = purple_certificate_get_pools(); l; l = l->next) { |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
173 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Certificate::Pool"))); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
174 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
175 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
176 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
177 purple_certificate_get_schemes() |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
178 PREINIT: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
179 GList *l; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
180 PPCODE: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
181 for(l = purple_certificate_get_schemes(); l; l = l->next) { |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
182 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Certificate::Scheme"))); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
183 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
184 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
185 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
186 purple_certificate_get_verifiers() |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
187 PREINIT: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
188 GList *l; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
189 PPCODE: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
190 for(l = purple_certificate_get_verifiers(); l; l = l->next) { |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
191 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Certificate::Verifier"))); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
192 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
193 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
194 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
195 purple_certificate_check_signature_chain(...) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
196 PREINIT: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
197 GList *l = NULL; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
198 gboolean ret; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
199 int i; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
200 PPCODE: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
201 for(i = 0; i < items; i++) { /* PurpleCertificate */ |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
202 l = g_list_prepend(l, purple_perl_ref_object(ST(i))); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
203 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
204 l = g_list_reverse(l); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
205 ret = purple_certificate_check_signature_chain(l); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
206 g_list_free(l); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
207 if(ret) XSRETURN_YES; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
208 XSRETURN_NO; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
209 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
210 SV* |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
211 purple_certificate_get_fingerprint_sha1(crt) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
212 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
213 PREINIT: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
214 GByteArray *gba = NULL; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
215 CODE: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
216 gba = purple_certificate_get_fingerprint_sha1(crt); |
26935
31f65046b92d
Various perl warning fixes as well as real fixes to gconstpointer functions
Paul Aurich <paul@darkrain42.org>
parents:
24700
diff
changeset
|
217 RETVAL = newSVpv((gchar *)gba->data, gba->len); |
23658
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
218 g_byte_array_free(gba, TRUE); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
219 OUTPUT: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
220 RETVAL |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
221 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
222 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
223 purple_certificate_verify(verifier, subject_name, cert_chain, cb, cb_data) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
224 Purple::Certificate::Verifier verifier |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
225 const gchar* subject_name |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
226 AV* cert_chain |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
227 CV *cb |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
228 SV *cb_data |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
229 PREINIT: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
230 GList *l = NULL; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
231 int len = 0, i = 0; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
232 struct cb_data *d = NULL; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
233 PPCODE: |
24700
bf2ca2c5ac40
Use av_len in the same manner as everywhere else, for consistency.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23658
diff
changeset
|
234 len = av_len(cert_chain); |
bf2ca2c5ac40
Use av_len in the same manner as everywhere else, for consistency.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23658
diff
changeset
|
235 for(i = 0; i <= len; i++) { |
23658
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
236 SV **sv = av_fetch(cert_chain, i, 0); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
237 if(!sv || !purple_perl_is_ref_object(*sv)) { |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
238 g_list_free(l); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
239 warn("Purple::Certificate::verify: cert_chain: non-purple object in array..."); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
240 XSRETURN_UNDEF; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
241 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
242 l = g_list_prepend(l, purple_perl_ref_object(*sv)); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
243 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
244 l = g_list_reverse(l); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
245 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
246 d = g_new0(struct cb_data, 1); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
247 d->cb = newSVsv(ST(3)); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
248 d->user_data = newSVsv(cb_data); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
249 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
250 purple_certificate_verify(verifier, subject_name, l, (PurpleCertificateVerifiedCallback) cb_cert_verify, d); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
251 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
252 g_list_free(l); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
253 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
254 MODULE = Purple::Certificate PACKAGE = Purple::Certificate::Pool PREFIX = purple_certificate_pool_ |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
255 PROTOTYPES: ENABLE |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
256 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
257 void |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
258 purple_certificate_pool_get_idlist(pool) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
259 Purple::Certificate::Pool pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
260 PREINIT: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
261 GList *l, *b; |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
262 PPCODE: |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
263 b = purple_certificate_pool_get_idlist(pool); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
264 for(l = b; l; l = l->next) { |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
265 XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
266 } |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
267 purple_certificate_pool_destroy_idlist(b); |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
268 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
269 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
270 purple_certificate_pool_contains(pool, id) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
271 Purple::Certificate::Pool pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
272 const gchar* id |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
273 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
274 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
275 purple_certificate_pool_delete(pool, id) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
276 Purple::Certificate::Pool pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
277 const gchar* id |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
278 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
279 Purple::Certificate::Scheme |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
280 purple_certificate_pool_get_scheme(pool) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
281 Purple::Certificate::Pool pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
282 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
283 gchar_own* |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
284 purple_certificate_pool_mkpath(pool, id) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
285 Purple::Certificate::Pool pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
286 const gchar* id |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
287 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
288 Purple::Certificate |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
289 purple_certificate_pool_retrieve(pool, id) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
290 Purple::Certificate::Pool pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
291 const gchar* id |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
292 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
293 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
294 purple_certificate_pool_store(pool, id, crt) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
295 Purple::Certificate::Pool pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
296 const gchar* id |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
297 Purple::Certificate crt |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
298 |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
299 gboolean |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
300 purple_certificate_pool_usable(pool) |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
301 Purple::Certificate::Pool pool |
9d7ebd28d339
Another Perl patch from Zsombor Welker to add more functions.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff
changeset
|
302 |