openssl/perl/OpenSSL.xs
Ralf S. Engelschall 84107e6ca8 Second round of fixing the OpenSSL perl/ stuff. It now at least compiled fine
under Unix and passes some trivial tests I've now added. But the whole stuff
is horribly incomplete, so a README.1ST with a disclaimer was added to make
sure no one expects that this stuff really works in the OpenSSL 0.9.2 release.
Additionally I've started to clean the XS sources up and fixed a few little
bugs and inconsistencies in OpenSSL.{pm,xs} and openssl_bio.xs.

PS: I'm still not convinces whether we should try to make this
    finally running or kick it out and replace it with some
    other module....
1999-03-08 11:25:49 +00:00

80 lines
1.3 KiB
Text

/*
** OpenSSL.xs
*/
#include "openssl.h"
SV *
new_ref(type, obj, mort)
char *type;
char *obj;
{
SV *ret;
if (mort)
ret = sv_newmortal();
else
ret = newSViv(0);
#ifdef DEBUG
printf(">new_ref %d\n",type);
#endif
sv_setref_pv(ret, type, (void *)obj);
return(ret);
}
int
ex_new(obj, data, ad, idx, argl, argp)
char *obj;
SV *data;
CRYPTO_EX_DATA *ad;
int idx;
long argl;
char *argp;
{
SV *sv;
#ifdef DEBUG
printf("ex_new %08X %s\n",obj,argp);
#endif
sv = sv_newmortal();
sv_setref_pv(sv, argp, (void *)obj);
#ifdef DEBUG
printf("%d>new_ref '%s'\n", sv, argp);
#endif
CRYPTO_set_ex_data(ad, idx, (char *)sv);
return(1);
}
void
ex_cleanup(obj, data, ad, idx, argl, argp)
char *obj;
SV *data;
CRYPTO_EX_DATA *ad;
int idx;
long argl;
char *argp;
{
pr_name("ex_cleanup");
#ifdef DEBUG
printf("ex_cleanup %08X %s\n", obj, argp);
#endif
if (data != NULL)
SvREFCNT_dec((SV *)data);
}
MODULE = OpenSSL PACKAGE = OpenSSL
BOOT:
boot_bio();
boot_cipher();
boot_digest();
boot_err();
boot_ssl();
boot_OpenSSL__BN();
boot_OpenSSL__BIO();
boot_OpenSSL__Cipher();
boot_OpenSSL__MD();
boot_OpenSSL__ERR();
boot_OpenSSL__SSL();
boot_OpenSSL__X509();