diff options
author | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 10:56:39 +0000 |
---|---|---|
committer | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 10:56:39 +0000 |
commit | 58964a492275ca9a59a0cd9c8155cb2491b4b909 (patch) | |
tree | c7b16876a5789463bbbb468ef4829c8129b3d718 /perl/x509.xs | |
parent | d02b48c63a58ea4367a0e905979f140b7d090f86 (diff) | |
download | openssl-58964a492275ca9a59a0cd9c8155cb2491b4b909.tar.gz |
Import of old SSLeay release: SSLeay 0.9.0b
Diffstat (limited to 'perl/x509.xs')
-rw-r--r-- | perl/x509.xs | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/perl/x509.xs b/perl/x509.xs new file mode 100644 index 0000000000..67633ad225 --- /dev/null +++ b/perl/x509.xs @@ -0,0 +1,74 @@ +#include "p5SSLeay.h" + +MODULE = SSLeay::X509 PACKAGE = SSLeay::X509 PREFIX = p5_X509_ + +PROTOTYPES: ENABLE +VERSIONCHECK: DISABLE + +void +p5_X509_new(void ) + PREINIT: + X509 *x509; + SV *arg; + PPCODE: + pr_name("p5_X509_new"); + EXTEND(sp,1); + PUSHs(sv_newmortal()); + x509=X509_new(); + sv_setref_pv(ST(0),"SSLeay::X509",(void *)x509); + +char * +p5_X509_get_subject_name(x509) + X509 *x509; + PREINIT: + char *p; + X509_NAME *name; + char buf[1024]; + int i; + CODE: + name=X509_get_subject_name(x509); + X509_NAME_oneline(name,buf,sizeof(buf)); + p= &(buf[0]); + RETVAL=p; + OUTPUT: + RETVAL + +char * +p5_X509_get_issuer_name(x509) + X509 *x509; + PREINIT: + char *p; + X509_NAME *name; + char buf[1024]; + int i; + CODE: + name=X509_get_issuer_name(x509); + X509_NAME_oneline(name,buf,sizeof(buf)); + p= &(buf[0]); + RETVAL=p; + OUTPUT: + RETVAL + +int +p5_X509_get_version(x509) + X509 *x509; + CODE: + RETVAL=X509_get_version(x509); + OUTPUT: + RETVAL + +BIGNUM * +p5_X509_get_serialNumber(x509) + X509 *x509; + CODE: + RETVAL=ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL); + OUTPUT: + RETVAL + +void +p5_X509_DESTROY(x509) + X509 *x509; + CODE: + pr_name("p5_X509_DESTROY"); + X509_free(x509); + |