com.Sericon.ProductAgents.AutoSSLAgent
Class ProductRegistrationAgentCSR

java.lang.Object
  extended by com.Sericon.ProductAgents.AutoSSLAgent.ProductRegistrationAgent
      extended by com.Sericon.ProductAgents.AutoSSLAgent.ProductRegistrationAgentCSR

public class ProductRegistrationAgentCSR
extends ProductRegistrationAgent

ProductRegistrationAgentCSR is one of the main classes of the AutoSSL Agent, and may be instantiated by an application that wishes to connect to an AutoSSL Server in order to provision an SSL certificate. ProductRegistrationAgentCSR should be used by applications that wish to have the AutoSSL Server sign a certificate that is created outside of the AutoSSL process. This could happen for several reasons, such as the Web Server that the application contains requiring that it generate the keypair that it uses. If this is the case, then the AutoSSL Agent can accept an externally generated CSR and have it signed by the AutoSSL process. Of course, this assumes that the base domain being used is acceptable to the AutoSSL Server, and the CSR is properly formed for the AutoSSL process.

ProductRegistrationAgentCSR is responsible for:

Finally, the ProductRegistrationAgentCSR is responsible to periodically contact the Naming Server (a service of the AutoSSL Server) to ensure that the resolution of its DNS name is properly updated, especially if the network that the application runs on has a dynamic IP address.

For information on an alternate main class for the AutoSSL Agent, please see:

See Also:
ProductRegistrationAgentKeystore

Constructor Summary
ProductRegistrationAgentCSR(StatusCheck statusCheck, java.lang.String autosslServerHost, int autosslServerPort, java.lang.String productName, java.lang.String productVersion, java.lang.String storedInfoDirectory, java.util.Locale locale)
          Construct a ProductRegistrationAgentCSR object
 
Method Summary
 java.io.File provisionSSLCertificate(java.lang.String reservationID, java.lang.String csrInfo, AuthorizationInfo authorizationInfo, java.lang.String email, int numYears)
          Registers this application with the AutoSSL Server and provisions a trusted, signed SSL certificate to that application.
 java.io.File renewSSLCertificate(java.lang.String csrInfo, AuthorizationInfo authorizationInfo, java.lang.String email, int numYears)
          Renews a certificate that's about to expire.
 
Methods inherited from class com.Sericon.ProductAgents.AutoSSLAgent.ProductRegistrationAgent
applicationFinished, daysUntilCertificateExpires, getBaseDomain, getCustomerInformation, getFTAgent, getServerID, getSSLCertificate, hasCertificate, registerForPeriodicServices, reserveServerID, validateLocationInformation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductRegistrationAgentCSR

public ProductRegistrationAgentCSR(StatusCheck statusCheck,
                                   java.lang.String autosslServerHost,
                                   int autosslServerPort,
                                   java.lang.String productName,
                                   java.lang.String productVersion,
                                   java.lang.String storedInfoDirectory,
                                   java.util.Locale locale)
                            throws PRAException
Construct a ProductRegistrationAgentCSR object

Parameters:
statusCheck - An object that will receive update status messages from the AutoSSL Agent. These messages may be displayed to the user to inform him of what the AutoSSL Agent is doing. If an application does not wish to receive such messages, this value may be set to null.
autosslServerHost - The host name of the AutoSSL Server.
autosslServerPort - The port of the AutoSSL Server.
productName - The name of the application that contains this AutoSSL Agent.
productVersion - The version of the application that contains this AutoSSL Agent.
storedInfoDirectory - The name of the directory to be used to store information that the ProductRegistrationAgent needs between runs.
locale - The locale to be used for any user-facing text. If the requested locale is not supported, en_US will be used instead.
Throws:
PRAException
Method Detail

provisionSSLCertificate

public java.io.File provisionSSLCertificate(java.lang.String reservationID,
                                            java.lang.String csrInfo,
                                            AuthorizationInfo authorizationInfo,
                                            java.lang.String email,
                                            int numYears)
                                     throws PRAException
Registers this application with the AutoSSL Server and provisions a trusted, signed SSL certificate to that application. This method will perform the following actions:

Parameters:
reservationID - The string returned by reserveServerID(...).
csrInfo - The CSR that will be sent to the AutoSSL Server for signing.
authorizationInfo - Information that proves to the AutoSSL Server that the AutoSSL Agent with which it is communicating is not an imposter. The information contained in this is dependant on how the AutoSSL Server is configured.
email - The email address of the person repsonsible for this certificate.
numYears - Specify the number of years that this certificate will be valid
Returns:
A File containing the AutoSSL Server's response to the CSR. This data will be in PKCS #7 format, and will be in a .p7b file.
Throws:
PRAException

renewSSLCertificate

public java.io.File renewSSLCertificate(java.lang.String csrInfo,
                                        AuthorizationInfo authorizationInfo,
                                        java.lang.String email,
                                        int numYears)
                                 throws PRAException
Renews a certificate that's about to expire. The new certificate will contain the same identification information as the current certificate, but will have a new serial number, encryption keypair, and expiration date. Because the renewal will most likely not happen on the date of expiration of the old certificate, any unused time from the old certificate will be added onto the end of the new certificate.

Parameters:
csrInfo - The CSR that will be sent to the AutoSSL Server for signing.
authorizationInfo - Information that proves to the AutoSSL Server that the AutoSSL Agent with which it is communicating is not an imposter. The information contained in this is dependant on how the AutoSSL Server is configured.
email - The email address of the person repsonsible for this certificate.
numYears - Specify the number of years that this certificate will be valid
Returns:
A File containing the AutoSSL Server's response to the CSR. This data will be in PKCS #7 format, and will be in a .p7b file.
Throws:
PRAException