コード例 #1
0
        private bool HasCryptoModeChanged(RMSTrustedPublishingDomain oldDefaultTPD, string newSlcCertChainCompressed)
        {
            XrmlCertificateChain xrmlCertificateChain  = RMUtil.DecompressSLCCertificate(oldDefaultTPD.SLCCertChain);
            XrmlCertificateChain xrmlCertificateChain2 = RMUtil.DecompressSLCCertificate(newSlcCertChainCompressed);

            return(xrmlCertificateChain.GetCryptoMode() != xrmlCertificateChain2.GetCryptoMode());
        }
コード例 #2
0
ファイル: RmsUtil.cs プロジェクト: YHZX2013/exchange_diff
        private static int CryptoModeFromTpd(TrustedDocDomain tpd)
        {
            string compressedCerts = RMUtil.CompressSLCCertificateChain(tpd.m_strLicensorCertChain);
            XrmlCertificateChain xrmlCertificateChain = RMUtil.DecompressSLCCertificate(compressedCerts);

            return(xrmlCertificateChain.GetCryptoMode());
        }
コード例 #3
0
        private static object CryptoModeGetter(IPropertyBag propertyBag)
        {
            string text = (string)propertyBag[RMSTrustedPublishingDomainSchema.SLCCertChain];

            if (!string.IsNullOrEmpty(text))
            {
                XrmlCertificateChain xrmlCertificateChain = RMUtil.DecompressSLCCertificate(text);
                return(xrmlCertificateChain.GetCryptoMode());
            }
            return(RMSTrustedPublishingDomainSchema.CryptoMode.DefaultValue);
        }
        private static int CryptoModeFromCompressedSLC(string compressedSLCCertChain)
        {
            XrmlCertificateChain xrmlCertificateChain = RMUtil.DecompressSLCCertificate(compressedSLCCertChain);

            return(xrmlCertificateChain.GetCryptoMode());
        }