-
Notifications
You must be signed in to change notification settings - Fork 0
/
openssl.vapi
46 lines (40 loc) · 1.11 KB
/
openssl.vapi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[CCode (cprefix = "")]
namespace OpenSSL
{
[CCode (cprefix = "NID_", cheader_filename = "openssl/objects.h")]
public enum NID
{
sha256
}
[Compact]
[CCode (cname = "BIO_METHOD")]
public class BIOMethod
{
}
[Compact]
[CCode (lower_case_cprefix = "BIO_", cheader_filename = "openssl/bio.h")]
public class BIO
{
public static unowned BIOMethod s_mem ();
public BIO (BIOMethod type);
public int read (uint8[] buf);
}
[Compact]
[CCode (lower_case_cprefix = "RSA_", cheader_filename = "openssl/rsa.h")]
public class RSA
{
public int size ();
[CCode (instance_pos = 5)]
public bool sign (int type, uint8[] m, [CCode (array_length = false)] uint8[] sigret, out int siglen);
}
[CCode (lower_case_cprefix = "PEM_")]
namespace PEM
{
[CCode (cname = "pem_password_cb")]
public delegate int PasswordCallback (uint8[] buf, int flag);
public void read_RSAPrivateKey (GLib.FileStream f, out RSA x, PasswordCallback? cb = null);
public bool write_bio_RSAPublicKey (BIO bp, RSA x);
}
[CCode (cname = "i2d_RSA_PUBKEY")]
public int i2d_RSA_PUBKEY (RSA rsa, [CCode (array_length = false)] out uchar[] pp);
}