~ubuntu-branches/ubuntu/raring/libvirt/raring

« back to all changes in this revision

Viewing changes to tests/virnettlscontexttest.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-11-19 10:41:02 UTC
  • mfrom: (1.2.15) (223.1.2 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121119104102-l6ewdppikysbzztu
Tags: 1.0.0-0ubuntu2
debian/patches/add-armhf-sysinfo-infomration.patch: Disable
to fix FTBFS on arm.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 * Lesser General Public License for more details.
13
13
 *
14
14
 * You should have received a copy of the GNU Lesser General Public
15
 
 * License along with this library; if not, write to the Free Software
16
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
15
 * License along with this library.  If not, see
 
16
 * <http://www.gnu.org/licenses/>.
17
17
 *
18
18
 * Author: Daniel P. Berrange <berrange@redhat.com>
19
19
 */
448
448
 * This code is done when libvirtd starts up, or before
449
449
 * a libvirt client connects. The test is ensuring that
450
450
 * the creation of virNetTLSContextPtr fails if we
451
 
 * give bogus certs, or suceeds for good certs
 
451
 * give bogus certs, or succeeds for good certs
452
452
 */
453
453
static int testTLSContextInit(const void *opaque)
454
454
{
496
496
    ret = 0;
497
497
 
498
498
cleanup:
499
 
    virNetTLSContextFree(ctxt);
 
499
    virObjectUnref(ctxt);
500
500
    gnutls_x509_crt_deinit(data->careq.crt);
501
501
    gnutls_x509_crt_deinit(data->certreq.crt);
502
502
    data->careq.crt = data->certreq.crt = NULL;
710
710
    ret = 0;
711
711
 
712
712
cleanup:
713
 
    virNetTLSContextFree(serverCtxt);
714
 
    virNetTLSContextFree(clientCtxt);
715
 
    virNetTLSSessionFree(serverSess);
716
 
    virNetTLSSessionFree(clientSess);
 
713
    virObjectUnref(serverCtxt);
 
714
    virObjectUnref(clientCtxt);
 
715
    virObjectUnref(serverSess);
 
716
    virObjectUnref(clientSess);
717
717
    gnutls_x509_crt_deinit(data->careq.crt);
718
718
    if (data->othercareq.filename)
719
719
        gnutls_x509_crt_deinit(data->othercareq.crt);