Ejemplo n.º 1
0
 /// <summary>
 /// Create a TrustAnchorGroup to use an existing container.
 /// </summary>
 ///
 /// <param name="certificateContainer">The existing certificate container.</param>
 /// <param name="id">The group ID.</param>
 public TrustAnchorGroup(CertificateContainerInterface certificateContainer,
                         String id)
 {
     this.anchorNames_ = new HashedSet <Name>();
     certificates_     = certificateContainer;
     id_ = id;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a dynamic trust anchor group.
        /// This loads all the certificates from the path and will refresh certificates
        /// every refreshPeriod milliseconds.
        /// Note that refresh is not scheduled, but is performed upon each "find"
        /// operations.
        /// When isDirectory is false and the path doesn't point to a valid certificate
        /// (the file doesn't exist or the content is not a valid certificate), then
        /// the dynamic anchor group will be empty until the file gets created. If the
        /// file disappears or gets corrupted, the anchor group becomes empty.
        /// When isDirectory is true and the path doesn't point to a valid folder, the
        /// folder is empty, or it doesn't contain valid certificates, then the group
        /// will be empty until certificate files are placed in the folder. If the
        /// folder is removed, becomes empty, or no longer contains valid certificates,
        /// then the anchor group becomes empty.
        /// Upon refresh, the existing certificates are not changed.
        /// </summary>
        ///
        /// <param name="certificateContainer"></param>
        /// <param name="id">The group id.</param>
        /// <param name="path">be loaded.</param>
        /// <param name="refreshPeriod"></param>
        /// <param name="isDirectory"></param>
        /// <exception cref="System.ArgumentException">If refreshPeriod is not positive.</exception>
        public DynamicTrustAnchorGroup(
            CertificateContainerInterface certificateContainer, String id,
            String path, double refreshPeriod, bool isDirectory) : base(certificateContainer, id)
        {
            isDirectory_   = isDirectory;
            path_          = path;
            refreshPeriod_ = refreshPeriod;
            expireTime_    = 0;
            if (refreshPeriod <= 0)
            {
                throw new ArgumentException(
                          "Refresh period for the dynamic group must be positive");
            }

            logger_.log(ILOG.J2CsMapping.Util.Logging.Level.INFO, "Create a dynamic trust anchor group " + id
                        + " for file/dir " + path + " with refresh time "
                        + refreshPeriod);
            refresh();
        }
Ejemplo n.º 3
0
 public StaticTrustAnchorGroup(
     CertificateContainerInterface certificateContainer, String id) : base(certificateContainer, id)
 {
 }