Encapsulates a Windows Azure service certificate
 public SslEnablement(ServiceCertificate certificate, string roleName)
     : this(certificate)
 {
     ((ICloudConfig) this).Rolename = roleName;
 }
        /// <summary>
        /// Creates a service certificate and adds to the remote config 
        /// </summary>
        public ServiceCertificate CreateServiceCertificateAndAddRemoteDesktop(string username, string password, ref CscfgFile file)
        {
            var certificate = new ServiceCertificate(username, password);
            certificate.Create();

            var desktop = new RemoteDesktop(certificate)
                              {
                                  Username = username,
                                  Password = password
                              };
            file.NewVersion = ((ICloudConfig) desktop).ChangeConfig(file.NewVersion);
            return certificate;
        }
        /// <summary>
        /// Given a thumbprint and password will search the local stores to find a certificate and associated private key
        /// </summary>
        IHostedServiceActivity IServiceCertificate.UploadExistingServiceCertificate(string thumbprint, string password)
        {
            ServiceCertificate = new ServiceCertificate(string.Empty);
            ServiceCertificate.GetExisting(thumbprint, password);

            return this;
        }
 public SslEnablement(ServiceCertificate certificate)
 {
     _certificate = certificate;
 }
 /// <summary>
 /// And or role instance as well
 /// </summary>
 public RemoteDesktop(ServiceCertificate certificate, string roleName) : this(certificate)
 {
     ((ICloudConfig)this).Rolename = roleName;
 }
        /// <summary>
        /// Generates a service certificate and adds the appropriate text to the <certificates/> tag in the .cscfg file
        /// </summary>
        IHostedServiceActivity IServiceCertificate.GenerateAndAddServiceCertificate(string name)
        {
            ServiceCertificate = new ServiceCertificate(name);
            // we have to also create the certificate!
            ServiceCertificate.Create();

            // add these to the config list we have to implement changes to
            if (EnableSsl)
                CloudConfigChanges.Add(new SslEnablement(ServiceCertificate, SslRoleName));
            if (EnableRemoteDesktop)
                CloudConfigChanges.Add(new RemoteDesktop(ServiceCertificate, RdRoleName)
                                           {
                                               Username = RdUsername,
                                               Password = RdPassword
                                           });

            return this;
        }
 /// <summary>
 /// This class has to be enabled with a service certificate
 /// </summary>
 public RemoteDesktop(ServiceCertificate certificate)
 {
     _certificate = certificate;
 }
 public SslEnablement(ServiceCertificate certificate, string roleName) : this(certificate)
 {
     ((ICloudConfig)this).Rolename = roleName;
 }
 public SslEnablement(ServiceCertificate certificate)
 {
     _certificate = certificate;
 }
Example #10
0
 /// <summary>
 /// And or role instance as well 
 /// </summary>
 public RemoteDesktop(ServiceCertificate certificate, string roleName)
     : this(certificate)
 {
     ((ICloudConfig) this).Rolename = roleName;
 }
Example #11
0
 /// <summary>
 /// This class has to be enabled with a service certificate
 /// </summary>
 public RemoteDesktop(ServiceCertificate certificate)
 {
     _certificate = certificate;
 }