Merge "Added new method to the NotificationManager Interface" into tizen_2.2
[platform/framework/native/appfw.git] / inc / FSecCertX509Certificate.h
index dca0d2c..b1dfee8 100755 (executable)
@@ -15,7 +15,7 @@
 //
 
 /**
- * @file                       FSecCertX509Certificate.h
+ * @file               FSecCertX509Certificate.h
  * @brief              This is the header file for the %X509Certificate class.
  *
  * This header file contains the declarations of the %X509Certificate class.
@@ -31,11 +31,11 @@ namespace Tizen { namespace Security { namespace Cert
 
 /**
  * @class      X509Certificate
- * @brief      This class is used for managing a variety of identity certificates.
+ * @brief      This class provides methods for managing identity certificates.
  *
  * @since      2.0
  *
- * The %X509Certificate class is used for managing a variety of identity certificates. @n
+ * The %X509Certificate class provides methods for managing identity certificates. @n
  *
  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/security/certificate_namespace.htm">Certificates</a>.
  *
@@ -70,17 +70,18 @@ public:
         * @param[in]   input                           An instance of Tizen::Base::ByteBuffer
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_INVALID_ARG           The specified input parameter is invalid.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The Tizen::Base::ByteBuffer operation has failed.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred.
+        *                                                                      - The Tizen::Base::ByteBuffer operation has failed.
         */
        result Construct(const Tizen::Base::ByteBuffer& input);
 
        /**
-        * Gets the format name for this certificate.
+        * Gets the format of this certificate.
         *
         * @since               2.0
         *
-        * @return              The format of this certificate
+        * @return              The certificate format
         */
        virtual Tizen::Base::String GetFormat(void) const;
 
@@ -91,15 +92,17 @@ public:
         *
         * @return              The certificate type
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The certificate link list operation has failed.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred.
+        *                                                                      - The certificate link list operation has failed.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        virtual CertificateType GetType(void) const;
 
        /**
         * Gets the encoded form of the certificate. @n
-        * It is assumed that each certificate type will have only a single form of encoding. For example, X.509 certificates will be encoded as ASN.1 DER.
+        * It is assumed that each certificate type will have only a single form of encoding. For example, X.509 certificates will 
+        * be encoded as ASN.1 DER.
         *
         * @since               2.0
         *
@@ -107,16 +110,17 @@ public:
         *                              else @c null if an error occurs
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The certificate link list operation or
-        *                                  the Tizen::Base::ByteBuffer operation has failed.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred.
+        *                                                                      - The certificate link list operation has failed.
+        *                                                                      - The Tizen::Base::ByteBuffer operation has failed.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::ByteBuffer* GetEncodedDataN(void) const;
 
        /**
         * Gets the fingerprint of the certificate. @n
-        * It is the hashed value of the encoding of the certificate.
+        * It is the hash value of the encoding of the certificate.
         *
         * @since               2.0
         *
@@ -124,10 +128,11 @@ public:
         *                              else @c null if an error occurs
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The certificate parsing operation or
-        *                                  the Tizen::Base::ByteBuffer operation has failed.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred. 
+        *                                                                      - The certificate parsing operation has failed.
+        *                                                                      - The Tizen::Base::ByteBuffer operation has failed.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::ByteBuffer* GetFingerprintN(void) const;
 
@@ -142,9 +147,10 @@ public:
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_INVALID_ARG           The specified @c publicKey is invalid or empty.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The certificate parsing operation has failed.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                      - A system error has occurred.
+        *                                                      - The certificate parsing operation has failed.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        virtual bool Verify(const Tizen::Security::IPublicKey& publicKey);
 
@@ -158,9 +164,10 @@ public:
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
         * @exception   E_KEY_NOT_FOUND         The key is not found.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The Tizen::Base::ByteBuffer operation has failed.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred.
+        *                                                                      - The Tizen::Base::ByteBuffer operation has failed.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Security::IPublicKey* GetPublicKeyN(void) const;
 
@@ -182,9 +189,9 @@ public:
        int GetSpecVersion(void) const;
 
        /**
-        * Gets the serial number value from the certificate. @n
-        * The serial number is an integer assigned by the Certification Authority (CA) to each certificate. It is unique for each certificate issued by a given
-        * CA (that is, the issuer name and serial number must identify a unique certificate). @n
+        * Gets the serial number of the certificate. @n
+        * The serial number is a unique integer assigned by the Certification Authority (CA) to each certificate (that is, 
+        * the issuer name and serial number must identify a unique certificate). @n
         *
         * This is defined in ASN.1 as demonstrated in the following code:
         *
@@ -194,21 +201,22 @@ public:
         * CertificateSerialNumber  ::=  INTEGER
         * @endcode
         *
-        * This serial number can be greater than the system's maximum defined value for @c int, the output parameter type is @c ByteBuffer, instead of @c int.
+        * Since the serial number can be greater than the system's maximum defined value for @c int, the output parameter type 
+        * is @c ByteBuffer, instead of @c int.
         *
-        * @since                       2.0
+        * @since               2.0
         *
         * @return              The serial number of the certificate
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::String GetSerialNumber(void) const;
 
        /**
         * Checks whether the certificate is currently valid. @n
-        * It is valid if the current date and time are within the validity period given in the certificate. The validity period consists of two date and time
-        * values: the initial date and time, and the final date and time until the validity of the certificate. @n
+        * It is valid if the current date and time are within the validity period of the certificate. The validity period consists 
+        * of two date and time values: the initial date and time, and the final date and time for the validity of the certificate. @n
         *
         * This is defined in ASN.1 as demonstrated in the following code:
         *
@@ -228,9 +236,10 @@ public:
         *
         * @return              The validity period of the certificate
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                                                      The certificate link list operation has failed.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred.
+        *                                                                      - The certificate link list operation has failed.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        virtual ValidityPeriod CheckValidityPeriod(void);
 
@@ -238,15 +247,16 @@ public:
         *  Gets the notBefore value of @c String type from the validity period of the certificate. @n
         *      This value represents the date and time before which the certificate is not valid.
         *
-        * @since                       2.0
+        * @since               2.0
         *
         * @return              A string representing the date and time value before which the certificate is not valid
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The method has failed to get the certificate validity information.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred.
+        *                                                                      - The method has failed to get the certificate validity information.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         * @see                 Tizen::Security::Cert::X509Certificate::CheckValidityPeriod(void) for relevant ASN.1 definitions.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::String GetNotBefore(void) const;
 
@@ -255,43 +265,46 @@ public:
         *      Gets the notAfter value of @c String type from the validity period of the certificate. @n
         *      This value represents the date and time after which the certificate is not valid.
         *
-        * @since                       2.0
+        * @since               2.0
         *
         * @return              A string representing the date and time value after which the certificate is not valid
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The method has failed to get the certificate validity information.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                      - A system error has occurred.
+        *                                                      - The method has failed to get the certificate validity information.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         * @see                 Tizen::Security::Cert::X509Certificate::CheckValidityPeriod(void) for relevant ASN.1 definitions.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::String GetNotAfter(void) const;
 
        /**
         * Gets the name of the issuer of the certificate.
         *
-        * @since                       2.0
+        * @since               2.0
         *
         * @return              The name of the issuer of the certificate
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The method has failed to get the certificate issuer information.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred.
+        *                                                                      - The method has failed to get the certificate issuer information.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::String GetIssuer(void) const;
 
        /**
         * Gets the subject name of the certificate.
         *
-        * @since                       2.0
+        * @since               2.0
         *
         * @return              The subject name of the certificate
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The method has failed to get the certificate issuer information.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred.
+        *                                                                      - The method has failed to get the certificate issuer information.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::String GetSubject(void) const;
 
@@ -310,30 +323,32 @@ public:
         *
         * The algorithm name is determined from the algorithm OID string.
         *
-        * @since                       2.0
+        * @since               2.0
         *
         * @return              The signature algorithm of the certificate
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The certificate link list operation has failed.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred.
+        *                                                                      - The certificate link list operation has failed.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        Tizen::Base::String GetSignatureAlgorithm(void) const;
 
        /**
         * Gets the signature of the certificate.
         *
-        * @since                       2.0
+        * @since               2.0
         *
         * @return              A pointer to the Tizen::Base::ByteBuffer class that contains the output, @n
-        *                                      else @c null if an error occurs
+        *                              else @c null if an error occurs
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
-        * @exception   E_SYSTEM                        A system error has occurred. @n
-        *                                  The certificate link list operation or
-        *                                  the Tizen::Base::ByteBuffer operation has failed.
-        * @remarks        The specific error code can be accessed using the GetLastResult() method.
+        * @exception   E_SYSTEM                        Either of the following conditions has occurred:
+        *                                                                      - A system error has occurred.
+        *                                                                      - The certificate link list operation has failed.
+        *                                                                      - The Tizen::Base::ByteBuffer operation has failed.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
         */
        virtual Tizen::Base::ByteBuffer* GetSignatureN(void) const;