Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "../include/logging.h"
- // static char sigfile[MAXFILENAMELEN] = "/tmp/sig";
- int main ( int argc, char **argv )
- {
- // setup data base
- // pquery("drop table logpile");
- // pquery("create table logpile(id sequence nonempty, ..... , )")
- // TODO Interface fuer verifizierung bereitstellen
- // - hier muss noch hin wie ein digitales objekt repraesentiert wird - norman fragen
- gcry_error_t rc;
- // char obj[50]="Hallo Welt!";
- char obj[50]="Objekt1";
- // rc = logmessage ( "erika", "IAcheck", obj, "Lognachricht" );
- // rc = verifyrows(obj,0);
- //
- //
- // int i;
- //
- //
- gcry_sexp_t sig,pkey,skey;
- obtainkeys(&skey,&pkey);
- rc = sign(obj,&sig,&skey);
- printf("sign: %i, %s\n",gcry_err_code(rc),gcry_strerror(rc));
- rc=verifysig(&obj[0],sig,pkey);
- //
- // printf("exitval: %i: %s\n", gcry_err_code(rc),gcry_strerror ( rc ));
- // return(0);
- // rc=verifyrows(obj,0);
- if (rc == 0 ) {
- printf("Objekt: '%s' ist verifizierit\n",obj) ;
- return(0);
- }
- printf ( "Fehlercode von verify ist: %i, %s\n", gcry_err_code(rc) , gcry_strerror(rc));
- return ( 0 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement