]> gitweb.factorcode.org Git - factor.git/commitdiff
openssl.libcrypto: defining structs for some opaque aliens
authorBjörn Lindqvist <bjourne@gmail.com>
Thu, 12 Sep 2013 11:49:01 +0000 (13:49 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 17 Sep 2013 00:17:47 +0000 (17:17 -0700)
basis/openssl/libcrypto/libcrypto.factor

index 2a6d40035d6d92d9308c9844a0fe291ae4d7680f..3f5d1ac35c1bde78027a70d9445aba7ca2cdf3bf 100644 (file)
@@ -42,9 +42,9 @@ STRUCT: bio
     { ptr void* }
     { next-bio void* }
     { prev-bio void* }
-    { references int } 
+    { references int }
     { num-read ulong }
-    { num-write ulong } 
+    { num-write ulong }
     { crypto-ex-data-stack void* }
     { crypto-ex-data-dummy int } ;
 
@@ -59,9 +59,47 @@ CONSTANT: BIO_C_GET_SSL     110
 
 LIBRARY: libcrypto
 
+! ===============================================
+! crypto.h
+! ===============================================
+STRUCT: crypto_ex_data_st
+    { sk void* }
+    { dummy int } ;
+TYPEDEF: crypto_ex_data_st CRYPTO_EX_DATA
+
 ! ===============================================
 ! bio.h
 ! ===============================================
+STRUCT: bio_method_st
+    { type int }
+    { name c-string }
+    { bwrite void* }
+    { bread void* }
+    { bputs void* }
+    { bgets void* }
+    { ctrl void* }
+    { create void* }
+    { destroy void* }
+    { callback_ctrl void* } ;
+TYPEDEF: bio_method_st BIO_METHOD
+
+STRUCT: bio_st
+    { method BIO_METHOD* }
+    { callback void* }
+    { cb_arg c-string }
+    { init int }
+    { shutdown int }
+    { flags int }
+    { retry_reason int }
+    { num int }
+    { ptr void* }
+    { next_bio bio_st* }
+    { prev_bio bio_st* }
+    { references int }
+    { num_read ulong }
+    { num_write ulong }
+    { ex_data CRYPTO_EX_DATA } ;
+TYPEDEF: bio_st BIO
 
 FUNCTION: bio* BIO_new_file ( c-string filename, c-string mode ) ;
 
@@ -69,7 +107,7 @@ FUNCTION: int BIO_printf ( bio* bio, c-string format ) ;
 
 FUNCTION: long BIO_ctrl ( void* bio, int cmd, long larg, void* parg ) ;
 
-FUNCTION: void* BIO_new_socket ( int fd, int close-flag ) ;
+FUNCTION: BIO* BIO_new_socket ( int fd, int close-flag ) ;
 
 FUNCTION: void* BIO_new ( void* method ) ;
 
@@ -128,7 +166,7 @@ FUNCTION: EVP_MD_CTX* EVP_MD_CTX_create ( ) ;
 
 FUNCTION: void EVP_MD_CTX_destroy ( EVP_MD_CTX* ctx ) ;
 
-FUNCTION: int EVP_MD_CTX_copy_ex ( EVP_MD_CTX* out, EVP_MD_CTX* in ) ;  
+FUNCTION: int EVP_MD_CTX_copy_ex ( EVP_MD_CTX* out, EVP_MD_CTX* in ) ;
 
 FUNCTION: int EVP_DigestInit_ex ( EVP_MD_CTX* ctx, EVP_MD* type, ENGINE* impl ) ;
 
@@ -138,7 +176,7 @@ FUNCTION: int EVP_DigestFinal_ex ( EVP_MD_CTX* ctx, void* md, uint* s ) ;
 
 FUNCTION: int EVP_Digest ( void* data, uint count, void* md, uint* size, EVP_MD* type, ENGINE* impl ) ;
 
-FUNCTION: int EVP_MD_CTX_copy ( EVP_MD_CTX* out, EVP_MD_CTX* in ) ;  
+FUNCTION: int EVP_MD_CTX_copy ( EVP_MD_CTX* out, EVP_MD_CTX* in ) ;
 
 FUNCTION: int EVP_DigestInit ( EVP_MD_CTX* ctx, EVP_MD* type ) ;