VirtualBox

Changeset 60328 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Apr 5, 2016 10:44:40 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106396
Message:

bugref:8249. Improvement ICertificate interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/CertificateImpl.h

    r60246 r60328  
    1919#define ____H_CERTIFICATEIMPL
    2020
    21 //#define DONT_DUPLICATE_ALL_THE_DATA
    22 
    2321/* VBox includes */
    2422#include <VBox/settings.h>
     
    2826#include <vector>
    2927
    30 
    3128using namespace std;
    3229
    33 #ifndef DONT_DUPLICATE_ALL_THE_DATA
    34 /* VBox forward declarations */
    3530class Appliance;
    36 #endif
    3731
    3832class ATL_NO_VTABLE Certificate :
     
    4438    DECLARE_EMPTY_CTOR_DTOR(Certificate)
    4539
    46 #ifdef DONT_DUPLICATE_ALL_THE_DATA
     40    HRESULT init(Appliance* appliance);
    4741    HRESULT initCertificate(PCRTCRX509CERTIFICATE a_pCert, bool a_fTrusted);
    48 #else
    49     HRESULT init(Appliance* appliance);
    50 #endif
    5142    void uninit();
    5243
     
    5445    void FinalRelease();
    5546
    56 #ifndef DONT_DUPLICATE_ALL_THE_DATA
    57     HRESULT setData(RTCRX509CERTIFICATE const *inCert);
    58 #endif
    59 
    6047private:
    61 #ifndef DONT_DUPLICATE_ALL_THE_DATA /* This is a generic information object, not something that is exclusive to Appliance! */
    6248    const Appliance* m_appliance;
    63 #endif
    64 
    65 #ifndef DONT_DUPLICATE_ALL_THE_DATA /* This is a generic information object, not something that is exclusive to Appliance! */
    66     HRESULT setVersionNumber(uint64_t inVersionNumber);
    67     HRESULT setSerialNumber(uint64_t inSerialNumber);
    68     HRESULT setPublicKeyAlgorithmOID(const char *aPublicKeyAlgorithmOID);
    69     HRESULT setPublicKeyAlgorithmName(const char *aPublicKeyAlgorithmOID);
    70     HRESULT setSignatureAlgorithmOID(const char *aSignatureAlgorithmOID);
    71     HRESULT setSignatureAlgorithmName(const char *aSignatureAlgorithmOID);
    72     HRESULT setIssuerName(com::Utf8Str &aIssuerName);
    73     HRESULT setSubjectName(com::Utf8Str &aSubjectName);
    74     HRESULT setValidityPeriodNotBefore(PCRTTIME aValidityPeriodNotBefore);
    75     HRESULT setValidityPeriodNotAfter(PCRTTIME aValidityPeriodNotAfter);
    76     HRESULT setCertificateAuthority(BOOL aCertificateAuthority);
    77     HRESULT setSelfSigned(BOOL aSelfSigned);
    78     HRESULT setTrusted(BOOL aTrusted);
    79 //  HRESULT setSubjectPublicKey(std::vector<BYTE> aSubjectPublicKey);
    80 //  HRESULT setIssuerUniqueIdentifier(std::vector<BYTE> aIssuerUniqueIdentifier);
    81 //  HRESULT setSubjectUniqueIdentifier(std::vector<BYTE> aSubjectUniqueIdentifier);
    82 //  HRESULT setKeyUsage(std::vector<ULONG> aKeyUsage);
    83 //  HRESULT setExtendedKeyUsage(std::vector<com::Utf8Str> aExtendedKeyUsage);
    84 //  HRESULT setRawCertData(std::vector<BYTE> aRawCertData);
    85 #endif
    8649
    8750    // wrapped ICertificate properties
    88     HRESULT getVersionNumber(com::Utf8Str &aVersionNumber);
     51    HRESULT getVersionNumber(CertificateVersion_T *aVersionNumber);
    8952    HRESULT getSerialNumber(com::Utf8Str &aSerialNumber);
    9053    HRESULT getSignatureAlgorithmOID(com::Utf8Str &aSignatureAlgorithmOID);
     
    10568    HRESULT getSelfSigned(BOOL *aSelfSigned);
    10669    HRESULT getTrusted(BOOL *aTrusted);
    107 
     70    HRESULT getVerified(BOOL *aVerified);
     71    HRESULT getPresence(BOOL *aPresence);
    10872    // wrapped ICertificate methods
    10973    HRESULT queryInfo(LONG aWhat, com::Utf8Str &aResult);
    110 #ifndef DONT_DUPLICATE_ALL_THE_DATA
    111     HRESULT checkExistence(BOOL *aPresence);
    112     HRESULT isVerified(BOOL *aVerified);
    113 #endif
    11474
    115 #ifdef DONT_DUPLICATE_ALL_THE_DATA
    11675    /** @name Methods extracting COM data from the certificate object
    11776     * @{  */
     
    12281    HRESULT i_getEncodedBytes(PRTASN1CORE a_pAsn1Obj, std::vector<BYTE> &a_rReturn);
    12382    /** @} */
    124 #endif
     83
    12584    //data
    12685    struct Data;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette