/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2016-02-28 20:34:59 UTC
  • Revision ID: teddy@recompile.se-20160228203459-81vtqvr96yukyrok
Client: Remove calls to gnutls_global_init and gnutls_global_deinit

* plugins.d/mandos-client.c (init_gnutls_global, main): Don't call
  gnutls_global_init or gnutls_global_deinit anymore; these are
  unnecessary in GnuTLS 3.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
525
525
    fprintf_plus(stderr, "Initializing GnuTLS\n");
526
526
  }
527
527
  
528
 
  ret = gnutls_global_init();
529
 
  if(ret != GNUTLS_E_SUCCESS){
530
 
    fprintf_plus(stderr, "GnuTLS global_init: %s\n",
531
 
                 safer_gnutls_strerror(ret));
532
 
    return -1;
533
 
  }
534
 
  
535
528
  if(debug){
536
529
    /* "Use a log level over 10 to enable all debugging options."
537
530
     * - GnuTLS manual
545
538
  if(ret != GNUTLS_E_SUCCESS){
546
539
    fprintf_plus(stderr, "GnuTLS memory error: %s\n",
547
540
                 safer_gnutls_strerror(ret));
548
 
    gnutls_global_deinit();
549
541
    return -1;
550
542
  }
551
543
  
755
747
 globalfail:
756
748
  
757
749
  gnutls_certificate_free_credentials(mc->cred);
758
 
  gnutls_global_deinit();
759
750
  gnutls_dh_params_deinit(mc->dh_params);
760
751
  return -1;
761
752
}
2966
2957
  
2967
2958
  if(gnutls_initialized){
2968
2959
    gnutls_certificate_free_credentials(mc.cred);
2969
 
    gnutls_global_deinit();
2970
2960
    gnutls_dh_params_deinit(mc.dh_params);
2971
2961
  }
2972
2962