Exemple #1
0
 public SecurityOptions()
 {
     CAFileName               = "CA.pem";
     CertificateFileName      = "server.pem";
     CertificateType          = DicomTlsCertificateType.Pem;
     KeyFileName              = "server.pem";
     KeyFilePassword          = string.Empty;
     MaximumVerificationDepth = 9;
     MethodType               = DicomSslMethodType.SslV23;
     OptionsFlags             = DicomOpenSslOptionsFlags.AllBugWorkarounds | DicomOpenSslOptionsFlags.NoSslV2 | DicomOpenSslOptionsFlags.NoSslV3;
     VerificationFlags        = DicomOpenSslVerificationFlags.None;
 }
        DicomOpenSslVerificationFlags CheckboxesToVerificationFlags()
        {
            DicomOpenSslVerificationFlags flags = DicomOpenSslVerificationFlags.None;

            if (_checkBoxVerifyPeer.Checked)
            {
                flags |= DicomOpenSslVerificationFlags.Peer;
            }
            if (_checkBoxFailIfNoPeer.Checked)
            {
                flags |= DicomOpenSslVerificationFlags.FailIfNoPeerCertificate;
            }
            if (_checkBoxVerifyClientOnce.Checked)
            {
                flags |= DicomOpenSslVerificationFlags.ClientOnce;
            }
            return(flags);
        }
 void VerificationFlagsToCheckboxes(DicomOpenSslVerificationFlags flags)
 {
     _checkBoxVerifyPeer.Checked       = flags.IsFlagged(DicomOpenSslVerificationFlags.Peer);
     _checkBoxFailIfNoPeer.Checked     = flags.IsFlagged(DicomOpenSslVerificationFlags.FailIfNoPeerCertificate);
     _checkBoxVerifyClientOnce.Checked = flags.IsFlagged(DicomOpenSslVerificationFlags.ClientOnce);
 }