[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C source



I think you are missing dependencies from the ssl library. Have a look into the docs [1].

Your questions implies that you are not very experienced in C coding.
Maybe you should ask yourself the question if starting with a complex and potential security risky api like openssl is the right thing for a beginner.

Happy coding

[1] https://www.openssl.org/docs/manmaster/ssl/ssl.html


Am 15.07.2016 12:07 nachm. schrieb "Pol Hallen" <deben@fuckaround.org>:
sorry, my mistake about the package (I use debian testing)

  find /usr/include -name md5.h

find /usr/include/ -name md5.h
/usr/include/openssl/md5.h
/usr/include/crypto++/md5.h

  #include <openssl/md5.h>

now I've many errors

thanks for help!

alice.c:50:18: error: unknown type name ‘md5_context’
 void md5_starts( md5_context *ctx )
                  ^
alice.c:61:19: error: unknown type name ‘md5_context’
 void md5_process( md5_context *ctx, uint8 data[64] )
                   ^
alice.c:61:37: error: unknown type name ‘uint8’
 void md5_process( md5_context *ctx, uint8 data[64] )
                                     ^
alice.c:184:18: error: unknown type name ‘md5_context’
 void md5_update( md5_context *ctx, uint8 *input, uint32 length )
                  ^
alice.c:184:36: error: unknown type name ‘uint8’
 void md5_update( md5_context *ctx, uint8 *input, uint32 length )
                                    ^
alice.c:184:50: error: unknown type name ‘uint32’
 void md5_update( md5_context *ctx, uint8 *input, uint32 length )
                                                  ^
alice.c:223:8: error: unknown type name ‘uint8’
 static uint8 md5_padding[64] =
        ^
alice.c:231:18: error: unknown type name ‘md5_context’
 void md5_finish( md5_context *ctx, uint8 digest[16] )
                  ^
alice.c:231:36: error: unknown type name ‘uint8’
 void md5_finish( md5_context *ctx, uint8 digest[16] )
                                    ^
alice.c: In function ‘main’:
alice.c:299:3: error: unknown type name ‘md5_context’
   md5_context ctx;
   ^
alice.c:321:3: warning: implicit declaration of function ‘md5_starts’ [-Wimplicit-function-declaration]
   md5_starts( &ctx );
   ^
alice.c:325:7: warning: implicit declaration of function ‘md5_update’ [-Wimplicit-function-declaration]
       md5_update( &ctx, buf, i );
       ^
alice.c:332:3: warning: implicit declaration of function ‘md5_finish’ [-Wimplicit-function-declaration]
   md5_finish( &ctx, md5sum );
   ^


Pol



Reply to: