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/openssl_err.xs | |
parent | d02b48c63a58ea4367a0e905979f140b7d090f86 (diff) | |
download | openssl-58964a492275ca9a59a0cd9c8155cb2491b4b909.tar.gz |
Import of old SSLeay release: SSLeay 0.9.0b
Diffstat (limited to 'perl/openssl_err.xs')
-rw-r--r-- | perl/openssl_err.xs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/perl/openssl_err.xs b/perl/openssl_err.xs new file mode 100644 index 0000000000..6d1aec3ea1 --- /dev/null +++ b/perl/openssl_err.xs @@ -0,0 +1,46 @@ +#include "p5SSLeay.h" + +int boot_err() + { + SSL_load_error_strings(); + return(1); + } + +MODULE = SSLeay::ERR PACKAGE = SSLeay::ERR PREFIX = p5_ERR_ + +PROTOTYPES: ENABLE +VERSIONCHECK: DISABLE + +# md->error() - returns the last error in text or numeric context + +void +p5_ERR_get_error(...) + PPCODE: + char buf[512]; + unsigned long l; + + pr_name("p5_ERR_get_code"); + EXTEND(sp,1); + PUSHs(sv_newmortal()); + l=ERR_get_error(); + ERR_error_string(l,buf); + sv_setiv(ST(0),l); + sv_setpv(ST(0),buf); + SvIOK_on(ST(0)); + +void +p5_ERR_peek_error(...) + PPCODE: + char buf[512]; + unsigned long l; + + pr_name("p5_ERR_get_code"); + EXTEND(sp,1); + PUSHs(sv_newmortal()); + l=ERR_peek_error(); + ERR_error_string(l,buf); + sv_setiv(ST(0),l); + sv_setpv(ST(0),buf); + SvIOK_on(ST(0)); + + |