blob: 3a6f698f2854a2c27e22910f26982ac5c09004bc [file] [log] [blame]
Ralf S. Engelschall80730361999-02-10 09:38:31 +00001
2#include "openssl.h"
Ralf S. Engelschall58964a41998-12-21 10:56:39 +00003
4int boot_err()
5 {
6 SSL_load_error_strings();
7 return(1);
8 }
9
Ralf S. Engelschall80730361999-02-10 09:38:31 +000010MODULE = OpenSSL::ERR PACKAGE = OpenSSL::ERR PREFIX = p5_ERR_
Ralf S. Engelschall58964a41998-12-21 10:56:39 +000011
12PROTOTYPES: ENABLE
13VERSIONCHECK: DISABLE
14
15# md->error() - returns the last error in text or numeric context
16
17void
18p5_ERR_get_error(...)
19 PPCODE:
20 char buf[512];
21 unsigned long l;
22
23 pr_name("p5_ERR_get_code");
24 EXTEND(sp,1);
25 PUSHs(sv_newmortal());
26 l=ERR_get_error();
27 ERR_error_string(l,buf);
28 sv_setiv(ST(0),l);
29 sv_setpv(ST(0),buf);
30 SvIOK_on(ST(0));
31
32void
33p5_ERR_peek_error(...)
34 PPCODE:
35 char buf[512];
36 unsigned long l;
37
38 pr_name("p5_ERR_get_code");
39 EXTEND(sp,1);
40 PUSHs(sv_newmortal());
41 l=ERR_peek_error();
42 ERR_error_string(l,buf);
43 sv_setiv(ST(0),l);
44 sv_setpv(ST(0),buf);
45 SvIOK_on(ST(0));
46
47