/// <summary> /// Parse PROPRIETARYSERVERCERTIFICATE /// (parser index is updated according to parsed length) /// </summary> /// <param name="data">data to be parsed</param> /// <param name="currentIndex">current parser index</param> /// <returns>PROPRIETARYSERVERCERTIFICATE</returns> private PROPRIETARYSERVERCERTIFICATE ParseProprietaryServerCertificate(byte[] data, ref int currentIndex) { PROPRIETARYSERVERCERTIFICATE cert = new PROPRIETARYSERVERCERTIFICATE(); // serverCertificate: dwSigAlgId cert.dwSigAlgId = (dwSigAlgId_Values)ParseUInt32(data, ref currentIndex, false); // serverCertificate: dwKeyAlgId cert.dwKeyAlgId = (dwKeyAlgId_Values)ParseUInt32(data, ref currentIndex, false); // serverCertificate: wPublicKeyBlobType cert.wPublicKeyBlobType = (wPublicKeyBlobType_Values)ParseUInt16(data, ref currentIndex, false); // serverCertificate: wPublicKeyBlobLen cert.wPublicKeyBlobLen = ParseUInt16(data, ref currentIndex, false); // serverCertificate: PublicKeyBlob cert.PublicKeyBlob = ParseRsaPublicKey(data, ref currentIndex); // serverCertificate: wSignatureBlobType cert.wSignatureBlobType = (wSignatureBlobType_Values)ParseUInt16(data, ref currentIndex, false); // serverCertificate: wSignatureBlobLen cert.wSignatureBlobLen = ParseUInt16(data, ref currentIndex, false); // serverCertificate: SignatureBlob cert.SignatureBlob = GetBytes(data, ref currentIndex, (int)cert.wSignatureBlobLen); return cert; }