1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: ssl_CrlStore.h 4 Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. 5 These coded instructions, statements, and computer programs contain 6 proprietary information of Nintendo of America Inc. and/or Nintendo 7 Company Ltd., and are protected by Federal copyright law. They may 8 not be disclosed to third parties or copied or duplicated in any form, 9 in whole or in part, without the prior written consent of Nintendo. 10 $Rev: 31762 $ 11 *--------------------------------------------------------------------------- 12 13 14 */ 15 16 #ifndef NN_SSL_SSL_CRLSTORE_H_ 17 #define NN_SSL_SSL_CRLSTORE_H_ 18 19 #include <nn/util/util_NonCopyable.h> 20 #include <nn/ssl/ssl_Types.h> 21 22 #ifdef __cplusplus 23 24 namespace nn { 25 namespace ssl { 26 27 class Connection; 28 29 /* Please see man pages for details 30 31 */ 32 class CrlStore : private nn::util::NonCopyable<CrlStore> 33 { 34 friend class Connection; 35 public: 36 /* Please see man pages for details 37 38 */ 39 explicit CrlStore(); 40 41 /* Please see man pages for details 42 43 */ 44 virtual ~CrlStore (void); 45 46 /* Please see man pages for details 47 48 49 50 51 52 */ 53 nn::Result Initialize(void); 54 55 /* Please see man pages for details 56 57 58 59 60 61 62 */ 63 nn::Result Finalize(void); 64 65 /* Please see man pages for details 66 67 68 69 70 71 72 73 74 75 */ 76 nn::Result RegisterCrl(const u8* pCrlData, size_t crlDatasize, CrlId* pCrlIdCourier=NULL); 77 78 /* Please see man pages for details 79 80 81 82 83 84 85 86 87 */ 88 nn::Result RegisterCrl(InternalCrl inCrlName, CrlId* pCrlIdCourier=NULL); 89 90 /* Please see man pages for details 91 92 93 94 95 96 97 98 */ 99 nn::Result UnRegisterCrl(CrlId certId); 100 101 #ifdef NDEBUG_ENABLE 102 /* 103 104 105 */ GetId()106 CrlStoreId GetId(){return m_crlStoreId;} 107 #endif 108 109 private: 110 bool m_isInitialized; 111 NN_PADDING3; 112 CrlStoreId m_crlStoreId; 113 114 /* Please see man pages for details 115 116 117 118 119 */ IsValid()120 bool IsValid(){return m_isInitialized;} 121 }; 122 123 124 } // end of namespace ssl 125 } // end of namespace nn 126 127 #endif // __cplusplus 128 129 #include <nn/util/detail/util_CLibImpl.h> 130 131 132 /* Please see man pages for details 133 134 135 136 137 138 139 140 141 */ 142 143 /* Please see man pages for details 144 145 146 147 148 */ 149 NN_UTIL_DETAIL_CLIBIMPL_DEFINE_BUFFER_CLASS(nnsslCrlStore, nn::ssl::CrlStore, 12, u32); 150 151 /* Please see man pages for details 152 153 */ 154 NN_EXTERN_C nnResult nnsslCrlStoreInitialize(nnsslCrlStore* this_); 155 156 /* Please see man pages for details 157 158 */ 159 NN_EXTERN_C nnResult nnsslCrlStoreFinalize(nnsslCrlStore* this_); 160 161 /* Please see man pages for details 162 163 */ 164 NN_EXTERN_C nnResult nnsslCrlStoreRegisterCrl(nnsslCrlStore* this_, const u8* pCrlData, size_t certDatasize, NnSslCrlId* pCrlIdCourier); 165 166 /* Please see man pages for details 167 168 */ 169 NN_EXTERN_C nnResult nnsslCrlStoreRegistByInternalCrl(nnsslCrlStore* this_, NnSslInternalCrl certId); 170 171 172 /* Please see man pages for details 173 174 */ 175 NN_EXTERN_C nnResult nnsslCrlStoreUnRegisterCrl(nnsslCrlStore* this_, NnSslCertId certId); 176 177 178 /* 179 180 181 182 */ 183 184 #endif /* NN_SSL_SSL_CRLSTORE_H_ */ 185