protected AttributeCertificate getACFromResponse ( VOMSACRequest request , VOMSResponse response ) { byte [ ] acBytes = response . getAC ( ) ; if ( acBytes == null ) return null ; ASN1InputStream asn1InputStream = new ASN1InputStream ( acBytes ) ; AttributeCertificate attributeCertificate = null ; try { attributeCertificate = AttributeCertificate . getInstance ( asn1InputStream . readObject ( ) ) ; asn1InputStream . close ( ) ; return attributeCertificate ; } catch ( Throwable e ) { requestListener . notifyVOMSRequestFailure ( request , null , new VOMSError ( "Error unmarshalling VOMS AC. Cause: " + e . getMessage ( ) , e ) ) ; return null ; } }
Extracts an AC from a VOMS response