This commit was generated by cvs2svn to track changes on a CVS vendor
[openssl.git] / perl / OpenSSL.xs
1 #include "p5SSLeay.h"
2
3 SV *new_ref(type,obj,mort)
4 char *type;
5 char *obj;
6         {
7         SV *ret;
8
9         if (mort)
10                 ret=sv_newmortal();
11         else
12                 ret=newSViv(0);
13 printf(">new_ref %d\n",type);
14         sv_setref_pv(ret,type,(void *)obj);
15         return(ret);
16         }
17
18 int ex_new(obj,data,ad,idx,argl,argp)
19 char *obj;
20 SV *data;
21 CRYPTO_EX_DATA *ad;
22 int idx;
23 long argl;
24 char *argp;
25         {
26         SV *sv;
27
28 fprintf(stderr,"ex_new %08X %s\n",obj,argp);
29         sv=sv_newmortal();
30         sv_setref_pv(sv,argp,(void *)obj);
31 printf("%d>new_ref '%s'\n",sv,argp);
32         CRYPTO_set_ex_data(ad,idx,(char *)sv);
33         return(1);
34         }
35
36 void ex_cleanup(obj,data,ad,idx,argl,argp)
37 char *obj;
38 SV *data;
39 CRYPTO_EX_DATA *ad;
40 int idx;
41 long argl;
42 char *argp;
43         {
44         pr_name("ex_cleanup");
45 fprintf(stderr,"ex_cleanup %08X %s\n",obj,argp);
46         if (data != NULL)
47                 SvREFCNT_dec((SV *)data);
48         }
49
50 MODULE =  SSLeay        PACKAGE = SSLeay
51
52 BOOT:
53         boot_bio();
54         boot_cipher();
55         boot_digest();
56         boot_err();
57         boot_ssl();
58         boot_SSLeay__BN();
59         boot_SSLeay__BIO();
60         boot_SSLeay__Cipher();
61         boot_SSLeay__MD();
62         boot_SSLeay__ERR();
63         boot_SSLeay__SSL();
64         boot_SSLeay__X509();
65