2 * Copyright (c) 2014 <copyright holder> <email>
4 * For license details, see the LICENSE file in the root of this project.
8 #include "GSSCredential.h"
9 #include "../GSSException.h"
11 GSSCredential::GSSCredential()
13 this->credential = GSS_C_NO_CREDENTIAL;
16 GSSCredential::GSSCredential ( const GSSCredential& other )
18 this->credential = other.credential;
21 GSSCredential& GSSCredential::operator= ( const GSSCredential& gsscred )
23 this->credential = gsscred.credential;
27 GSSCredential::~GSSCredential()
30 OM_uint32 major, minor;
33 if (this->credential == GSS_C_NO_CREDENTIAL)
39 major = gss_release_cred(&minor, &(this->credential));
43 throw GSSException("Could not free the GSS credential", major, minor);