AlgorithmIdentifier::AlgorithmIdentifier(void)
: __pAlgorithmIdentifierImpl(null)
{
- __pAlgorithmIdentifierImpl = new (std::nothrow) _AlgorithmIdentifierImpl();
- SysTryReturnVoidResult(NID_SEC_CERT, __pAlgorithmIdentifierImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
AlgorithmIdentifier::~AlgorithmIdentifier(void)
{
- delete __pAlgorithmIdentifierImpl;
+
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pAlgorithmIdentifierImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pAlgorithmIdentifierImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+
+ __pAlgorithmIdentifierImpl = new (std::nothrow) _AlgorithmIdentifierImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pAlgorithmIdentifierImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pAlgorithmIdentifierImpl->Construct(algorithm, pAlgoParams);
- SysTryReturn(NID_IO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pAlgorithmIdentifierImpl;
+ __pAlgorithmIdentifierImpl = null;
return r;
}
{
result r = E_SUCCESS;
- SysAssertf(__pAlgorithmIdentifierImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pAlgorithmIdentifierImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pAlgorithmIdentifierImpl = new (std::nothrow) _AlgorithmIdentifierImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pAlgorithmIdentifierImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pAlgorithmIdentifierImpl->Construct(encodedData);
- SysTryReturn(NID_IO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pAlgorithmIdentifierImpl;
+ __pAlgorithmIdentifierImpl = null;
return r;
}
ClearLastResult();
SysAssertf(__pAlgorithmIdentifierImpl != null, "Not yet constructed. Reconstructor the object.");
+
std::unique_ptr< IAlgorithmParameters > pObj(__pAlgorithmIdentifierImpl->GetParametersN());
SysTryReturn(NID_IO, pObj != null, null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(r));
ClearLastResult();
SysAssertf(__pAlgorithmIdentifierImpl != null, "Not yet constructed. Reconstructor the object.");
+
std::unique_ptr< ByteBuffer > pEncAlgoIdParam(__pAlgorithmIdentifierImpl->GetEncodedDataN());
SysTryReturn(NID_IO, pEncAlgoIdParam != null, null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(r));
InitialVector::InitialVector(void)
: __pInitialVectorImpl(null)
{
- __pInitialVectorImpl = new (std::nothrow) _InitialVectorImpl();
- SysTryReturnVoidResult(NID_SEC_CERT, __pInitialVectorImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
InitialVector::~InitialVector(void)
{
- delete __pInitialVectorImpl;
+
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pInitialVectorImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pInitialVectorImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pInitialVectorImpl = new (std::nothrow) _InitialVectorImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pInitialVectorImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
r = __pInitialVectorImpl->Construct(initialVector);
- SysTryReturn(NID_IO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pInitialVectorImpl;
+ __pInitialVectorImpl = null;
return r;
Pkcs05PbEs2Parameters::Pkcs05PbEs2Parameters(void)
: __pPkcs05PbEs2ParametersImpl(null)
{
- __pPkcs05PbEs2ParametersImpl = new (std::nothrow) _Pkcs05PbEs2ParametersImpl();
- SysTryReturnVoidResult(NID_SEC_CRYPTO, __pPkcs05PbEs2ParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
Pkcs05PbEs2Parameters::~Pkcs05PbEs2Parameters(void)
{
- delete __pPkcs05PbEs2ParametersImpl;
+
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs05PbEs2ParametersImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs05PbEs2ParametersImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs05PbEs2ParametersImpl = new (std::nothrow) _Pkcs05PbEs2ParametersImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs05PbEs2ParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs05PbEs2ParametersImpl->Construct(encodedData);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
return r;
+CATCH:
+
+ delete __pPkcs05PbEs2ParametersImpl;
+ __pPkcs05PbEs2ParametersImpl = null;
+
+ return r;
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs05PbEs2ParametersImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs05PbEs2ParametersImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs05PbEs2ParametersImpl = new (std::nothrow) _Pkcs05PbEs2ParametersImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs05PbEs2ParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs05PbEs2ParametersImpl->Construct(keyDerivationFunction, encryptionScheme);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+ ;
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs05PbEs2ParametersImpl;
+ __pPkcs05PbEs2ParametersImpl = null;
return r;
Pkcs05PbKdf2Parameters::Pkcs05PbKdf2Parameters(void)
: __pPkcs05PbKdf2ParametersImpl(null)
{
- __pPkcs05PbKdf2ParametersImpl = new (std::nothrow) _Pkcs05PbKdf2ParametersImpl();
- SysTryReturnVoidResult(NID_SEC_CRYPTO, __pPkcs05PbKdf2ParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
Pkcs05PbKdf2Parameters::~Pkcs05PbKdf2Parameters(void)
{
- delete __pPkcs05PbKdf2ParametersImpl;
+
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs05PbKdf2ParametersImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs05PbKdf2ParametersImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs05PbKdf2ParametersImpl = new (std::nothrow) _Pkcs05PbKdf2ParametersImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs05PbKdf2ParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs05PbKdf2ParametersImpl->Construct(encodedData);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs05PbKdf2ParametersImpl;
+ __pPkcs05PbKdf2ParametersImpl = null;
return r;
}
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs05PbKdf2ParametersImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs05PbKdf2ParametersImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs05PbKdf2ParametersImpl = new (std::nothrow) _Pkcs05PbKdf2ParametersImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs05PbKdf2ParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs05PbKdf2ParametersImpl->Construct(saltBuffer, iterationCount, derivedKeyLength);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs05PbKdf2ParametersImpl;
+ __pPkcs05PbKdf2ParametersImpl = null;
return r;
}
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs05PbKdf2ParametersImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs05PbKdf2ParametersImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs05PbKdf2ParametersImpl = new (std::nothrow) _Pkcs05PbKdf2ParametersImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs05PbKdf2ParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs05PbKdf2ParametersImpl->Construct(saltBuffer, iterationCount, prf, derivedKeyLength);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs05PbKdf2ParametersImpl;
+ __pPkcs05PbKdf2ParametersImpl = null;
return r;
}
Pkcs05PbMacParameters::Pkcs05PbMacParameters(void)
: __pPkcs05PbMacParametersImpl(null)
{
- __pPkcs05PbMacParametersImpl = new (std::nothrow) _Pkcs05PbMacParametersImpl();
- SysTryReturnVoidResult(NID_SEC_CRYPTO, __pPkcs05PbMacParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
Pkcs05PbMacParameters::~Pkcs05PbMacParameters(void)
{
- delete __pPkcs05PbMacParametersImpl;
+
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs05PbMacParametersImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs05PbMacParametersImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs05PbMacParametersImpl = new (std::nothrow) _Pkcs05PbMacParametersImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs05PbMacParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
+
r = __pPkcs05PbMacParametersImpl->Construct(encodedData);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_IO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs05PbMacParametersImpl;
+ __pPkcs05PbMacParametersImpl = null;
return r;
}
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs05PbMacParametersImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs05PbMacParametersImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs05PbMacParametersImpl = new (std::nothrow) _Pkcs05PbMacParametersImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs05PbMacParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs05PbMacParametersImpl->Construct(keyDerivationFunction, messageAuthScheme);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs05PbMacParametersImpl;
+ __pPkcs05PbMacParametersImpl = null;
return r;
}
result r = E_SUCCESS;
SysAssertf(__pPkcs05PbMacParametersImpl != null, "Not yet constructed. Reconstructor the object.");
+
std::unique_ptr< ByteBuffer > pEncPbMacParam(__pPkcs05PbMacParametersImpl->GetEncodedDataN());
SysTryReturn(NID_SEC_CRYPTO, pEncPbMacParam != null, null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(r));
ClearLastResult();
SysAssertf(__pPkcs05PbMacParametersImpl != null, "Not yet constructed. Reconstructor the object.");
+
return __pPkcs05PbMacParametersImpl->GetHashCode();
}
Pkcs05Schemes::Pkcs05Schemes(void)
: __pPkcs05SchemesImpl(null)
{
- __pPkcs05SchemesImpl = new (std::nothrow) _Pkcs05SchemesImpl();
- SysTryReturnVoidResult(NID_SEC_CRYPTO, __pPkcs05SchemesImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
Pkcs05Schemes::~Pkcs05Schemes(void)
{
- delete __pPkcs05SchemesImpl;
+
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs05SchemesImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs05SchemesImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs05SchemesImpl = new (std::nothrow) _Pkcs05SchemesImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs05SchemesImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs05SchemesImpl->Construct(password, derivedKeyLength);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs05SchemesImpl;
+ __pPkcs05SchemesImpl = null;
return r;
}
Pkcs08Attribute::Pkcs08Attribute(void)
: __pPkcs08AttributeImpl(null)
{
- __pPkcs08AttributeImpl = new (std::nothrow) _Pkcs08AttributeImpl();
- SysTryReturnVoidResult(NID_SEC_CERT, __pPkcs08AttributeImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
Pkcs08Attribute::~Pkcs08Attribute(void)
{
- delete __pPkcs08AttributeImpl;
+
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs08AttributeImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs08AttributeImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs08AttributeImpl = new (std::nothrow) _Pkcs08AttributeImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs08AttributeImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs08AttributeImpl->Construct(encodedData);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs08AttributeImpl;
+ __pPkcs08AttributeImpl = null;
return r;
}
//Variables local to function
result r = E_SUCCESS;
- SysAssertf(__pPkcs08AttributeImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs08AttributeImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs08AttributeImpl = new (std::nothrow) _Pkcs08AttributeImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs08AttributeImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs08AttributeImpl->Construct(attrType);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs08AttributeImpl;
+ __pPkcs08AttributeImpl = null;
return r;
}
Pkcs08AttributeValue::Pkcs08AttributeValue(void)
: __pPkcs08AttributeValueImpl(null)
{
- __pPkcs08AttributeValueImpl = new (std::nothrow) _Pkcs08AttributeValueImpl();
- SysTryReturnVoidResult(NID_SEC_CERT, __pPkcs08AttributeValueImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
Pkcs08AttributeValue::~Pkcs08AttributeValue(void)
{
- delete __pPkcs08AttributeValueImpl;
+
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs08AttributeValueImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs08AttributeValueImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs08AttributeValueImpl = new (std::nothrow) _Pkcs08AttributeValueImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs08AttributeValueImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs08AttributeValueImpl->Construct(encodedData);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs08AttributeValueImpl;
+ __pPkcs08AttributeValueImpl = null;
return r;
}
//Variables local to function
result r = E_SUCCESS;
- SysAssertf(__pPkcs08AttributeValueImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs08AttributeValueImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs08AttributeValueImpl = new (std::nothrow) _Pkcs08AttributeValueImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs08AttributeValueImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs08AttributeValueImpl->Construct(value, tag);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs08AttributeValueImpl;
+ __pPkcs08AttributeValueImpl = null;
return r;
}
Pkcs08EncryptedPrivateKeyInfo::Pkcs08EncryptedPrivateKeyInfo(void)
: __pPkcs08EncryptedPrivateKeyInfoImpl(null)
{
- __pPkcs08EncryptedPrivateKeyInfoImpl = new (std::nothrow) _Pkcs08EncryptedPrivateKeyInfoImpl();
- SysTryReturnVoidResult(NID_SEC_CRYPTO, __pPkcs08EncryptedPrivateKeyInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
//Default Destructor
Pkcs08EncryptedPrivateKeyInfo::~Pkcs08EncryptedPrivateKeyInfo(void)
{
- delete __pPkcs08EncryptedPrivateKeyInfoImpl;
+
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs08EncryptedPrivateKeyInfoImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs08EncryptedPrivateKeyInfoImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs08EncryptedPrivateKeyInfoImpl = new (std::nothrow) _Pkcs08EncryptedPrivateKeyInfoImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs08EncryptedPrivateKeyInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs08EncryptedPrivateKeyInfoImpl->Construct(encodedData);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs08EncryptedPrivateKeyInfoImpl;
+ __pPkcs08EncryptedPrivateKeyInfoImpl = null;
return r;
}
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs08EncryptedPrivateKeyInfoImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs08EncryptedPrivateKeyInfoImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs08EncryptedPrivateKeyInfoImpl = new (std::nothrow) _Pkcs08EncryptedPrivateKeyInfoImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs08EncryptedPrivateKeyInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs08EncryptedPrivateKeyInfoImpl->Construct(algorithmId, encryptedData);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs08EncryptedPrivateKeyInfoImpl;
+ __pPkcs08EncryptedPrivateKeyInfoImpl = null;
return r;
}
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs08EncryptedPrivateKeyInfoImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs08EncryptedPrivateKeyInfoImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs08EncryptedPrivateKeyInfoImpl = new (std::nothrow) _Pkcs08EncryptedPrivateKeyInfoImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs08EncryptedPrivateKeyInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs08EncryptedPrivateKeyInfoImpl->Construct(algorithmId, key, encodedPrivateKeyInfoBuffer);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs08EncryptedPrivateKeyInfoImpl;
+ __pPkcs08EncryptedPrivateKeyInfoImpl = null;
return r;
}
Pkcs08PrivateKeyInfo::Pkcs08PrivateKeyInfo(void)
: __pPkcs08PrivateKeyInfoImpl(null)
{
- __pPkcs08PrivateKeyInfoImpl = new (std::nothrow) _Pkcs08PrivateKeyInfoImpl();
- SysTryReturnVoidResult(NID_SEC_CRYPTO, __pPkcs08PrivateKeyInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
//Default Destructor
Pkcs08PrivateKeyInfo::~Pkcs08PrivateKeyInfo(void)
{
- delete __pPkcs08PrivateKeyInfoImpl;
+
}
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs08PrivateKeyInfoImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs08PrivateKeyInfoImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs08PrivateKeyInfoImpl = new (std::nothrow) _Pkcs08PrivateKeyInfoImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs08PrivateKeyInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pPkcs08PrivateKeyInfoImpl->Construct(encodedData);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs08PrivateKeyInfoImpl;
+ __pPkcs08PrivateKeyInfoImpl = null;
return r;
}
{
result r = E_SUCCESS;
- SysAssertf(__pPkcs08PrivateKeyInfoImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pPkcs08PrivateKeyInfoImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pPkcs08PrivateKeyInfoImpl = new (std::nothrow) _Pkcs08PrivateKeyInfoImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pPkcs08PrivateKeyInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
+
r = __pPkcs08PrivateKeyInfoImpl->Construct(privAlgoId, privKey);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pPkcs08PrivateKeyInfoImpl;
+ __pPkcs08PrivateKeyInfoImpl = null;
return r;
}
Rc2CbcParameters::Rc2CbcParameters(void)
: __pRc2CbcParametersImpl(null)
{
- __pRc2CbcParametersImpl = new (std::nothrow) _Rc2CbcParametersImpl();
- SysTryReturnVoidResult(NID_SEC_CERT, __pRc2CbcParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
}
Rc2CbcParameters::~Rc2CbcParameters(void)
{
- delete __pRc2CbcParametersImpl;
+
}
result
{
result r = E_SUCCESS;
- SysAssertf(__pRc2CbcParametersImpl != null, "Not yet constructed. Reconstructor the object.");
+ SysAssertf(__pRc2CbcParametersImpl == null,
+ "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
+
+ __pRc2CbcParametersImpl = new (std::nothrow) _Rc2CbcParametersImpl();
+ SysTryReturnResult(NID_SEC_CRYPTO, __pRc2CbcParametersImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory in insufficient.");
+
r = __pRc2CbcParametersImpl->Construct(initialVector, version);
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SEC_CRYPTO, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+
+ return r;
+
+CATCH:
+
+ delete __pRc2CbcParametersImpl;
+ __pRc2CbcParametersImpl = null;
return r;
}
{
Tizen::Base::String algorithm;
- const _AlgorithmIdentifierImpl* pOther = dynamic_cast< const _AlgorithmIdentifierImpl* >(&obj);
+ SysAssertf(__algorithm.GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+ const _AlgorithmIdentifierImpl* pOther = dynamic_cast< const _AlgorithmIdentifierImpl* >(&obj);
SysTryReturn(NID_SEC_CRYPTO, pOther != null, false, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
if (pOther == this)
SysTryReturn(NID_SEC_CRYPTO, __pAlgoParams != null, false, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryReturn(NID_SEC_CRYPTO, dynamic_cast< Pkcs05PbEs2Parameters* >(__pAlgoParams) != null, false, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+
if (pEncObj->GetKeyDerivationAlgorithm().Equals(((dynamic_cast< Pkcs05PbEs2Parameters* >(__pAlgoParams))->GetKeyDerivationAlgorithm())))
{
if (pEncObj->GetEncryptionScheme().Equals(((dynamic_cast< Pkcs05PbEs2Parameters* >(__pAlgoParams))->GetEncryptionScheme())))
case _OID_TYPE_PBKDF2:
{
+
std::unique_ptr< Pkcs05PbKdf2Parameters > pKdf2Obj(dynamic_cast< Pkcs05PbKdf2Parameters* >(pOther->GetParametersN()));
SysTryReturn(NID_SEC_CRYPTO, pKdf2Obj, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
Pkcs05PbKdf2Parameters* pKdf2Obj = null;
int hashCode = 0;
+ SysAssertf(__algorithm.GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+
switch (_PkcsUtility::ConvertOidToEnum(__algorithm))
{
case _OID_TYPE_DES_CBC:
case _OID_TYPE_AES_256_CBC:
{
pIvObj = dynamic_cast< InitialVector* >(__pAlgoParams);
+ SysTryReturn(NID_SEC_CRYPTO, pIvObj != null, 0, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+
hashCode = __algorithm.GetHashCode() + pIvObj->GetHashCode();
return hashCode;
case _OID_TYPE_RC2_CBC:
{
+ SysTryReturn(NID_SEC_CRYPTO, __pAlgoParams != null, 0, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+
pRcObj = dynamic_cast< Rc2CbcParameters* >(__pAlgoParams);
+ SysTryReturn(NID_SEC_CRYPTO, pRcObj != null, 0, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+
hashCode = __algorithm.GetHashCode() + pRcObj->GetHashCode();
return hashCode;
case _OID_TYPE_PBES2:
{
+ SysTryReturn(NID_SEC_CRYPTO, __pAlgoParams != null, 0, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+
pEncObj = dynamic_cast< Pkcs05PbEs2Parameters* >(__pAlgoParams);
+ SysTryReturn(NID_SEC_CRYPTO, pEncObj != null, 0, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
hashCode = pEncObj->GetKeyDerivationAlgorithm().GetHashCode() + pEncObj->GetEncryptionScheme().GetHashCode();
case _OID_TYPE_PBKDF2:
{
+ SysTryReturn(NID_SEC_CRYPTO, __pAlgoParams != null, 0, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+
pKdf2Obj = dynamic_cast< Pkcs05PbKdf2Parameters* >(__pAlgoParams);
+ SysTryReturn(NID_SEC_CRYPTO, pKdf2Obj != null, 0, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
hashCode = __algorithm.GetHashCode() + pKdf2Obj->GetHashCode();
return hashCode;
std::unique_ptr< IAlgorithmParameters > pEncParam;
const byte* pBuffer = null;
- SysAssertf(__keyDerivationFunction.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
- SysAssertf(__encryptionScheme.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
-
pBuffer = encodedData.GetPointer();
SysTryReturnResult(NID_SEC_CRYPTO, pBuffer != null, E_INVALID_ARG, "The specified input parameter is invalid.");
{
result r = E_SUCCESS;
- SysAssertf(__keyDerivationFunction.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. ");
- SysAssertf(__encryptionScheme.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
-
std::unique_ptr< IAlgorithmParameters > pkdfParam(keyDerivationFunction.GetParametersN());
r = GetLastResult();
SysTryReturn(NID_SEC_CRYPTO, pkdfParam != null, r, r, "[%s] Failed to get the parameters.", GetErrorMessage(r));
_Pkcs05PbEs2ParametersImpl::GetEncryptionScheme(void) const
{
ClearLastResult();
+
+ SysAssertf(__keyDerivationFunction.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+ SysAssertf(__encryptionScheme.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+
return __encryptionScheme;
}
{
bool value = false;
+ SysAssertf(__keyDerivationFunction.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+ SysAssertf(__encryptionScheme.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+
const _Pkcs05PbEs2ParametersImpl* pOther = dynamic_cast< const _Pkcs05PbEs2ParametersImpl* >(&obj);
SysTryReturn(NID_SEC_CRYPTO, pOther != null, false, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
bool value = false;
const _Pkcs05PbKdf2ParametersImpl* pOther = dynamic_cast< const _Pkcs05PbKdf2ParametersImpl* >(&obj);
+ SysAssertf(__saltBuffer.GetRemaining() > 0, "Not yet constructed. Construct () should be called before use.");
+
SysTryReturn(NID_SEC_CRYPTO, pOther != null, false, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
if (pOther == this)
ASN1_TYPE* pParam = null;
std::unique_ptr< Pkcs05PbKdf2Parameters > pKdf2Parameters;
-
- SysAssertf(__keyDerivationFunction.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. ");
- SysAssertf(__messageAuthScheme.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. ");
-
pBuffer = encodedData.GetPointer();
SysTryReturnResult(NID_SEC_CRYPTO, pBuffer != null, E_INVALID_ARG, "The specified input parameter is invalid.");
{
result r = E_SUCCESS;
- SysAssertf(__keyDerivationFunction.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. ");
- SysAssertf(__messageAuthScheme.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. ");
-
std::unique_ptr< IAlgorithmParameters > pParam(keyDerivationFunction.GetParametersN());
- r = GetLastResult();
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Failed to get the parameters.", GetErrorMessage(r));
+ SysTryReturn(NID_SEC_CRYPTO, pParam != null, r, r, "[%s] Failed to get the parameters.", GetErrorMessage(r));
r = __keyDerivationFunction.Construct(keyDerivationFunction.GetAlgorithmObjectId(), pParam.get());
SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Failed to construct the algorithm identifier.", GetErrorMessage(r));
std::unique_ptr< IAlgorithmParameters > pAuthParam(messageAuthScheme.GetParametersN());
- r = GetLastResult();
- SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Failed to get the parameters.", GetErrorMessage(r));
+ SysTryReturn(NID_SEC_CRYPTO, pParam != null, r, r, "[%s] Failed to get the parameters.", GetErrorMessage(r));
r = __messageAuthScheme.Construct(messageAuthScheme.GetAlgorithmObjectId(), pAuthParam.get());
SysTryReturn(NID_SEC_CRYPTO, !IsFailed(r), r, r, "[%s] Failed to construct the algorithm identifier.", GetErrorMessage(r));
_Pkcs05PbMacParametersImpl::GetKeyDerivationAlgorithm(void) const
{
ClearLastResult();
+
+ SysAssertf(__keyDerivationFunction.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+ SysAssertf(__messageAuthScheme.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+
return __keyDerivationFunction;
}
_Pkcs05PbMacParametersImpl::GetMacAlgorithm(void) const
{
ClearLastResult();
+
+ SysAssertf(__keyDerivationFunction.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+ SysAssertf(__messageAuthScheme.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+
return __messageAuthScheme;
}
{
bool value = false;
+ SysAssertf(__keyDerivationFunction.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+ SysAssertf(__messageAuthScheme.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
+
const _Pkcs05PbMacParametersImpl* pOther = dynamic_cast< const _Pkcs05PbMacParametersImpl* >(&obj);
SysTryReturn(NID_SEC_CRYPTO, pOther != null, false, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
SysAssertf(__keyDerivationFunction.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
SysAssertf(__messageAuthScheme.GetAlgorithmObjectId().GetLength() > 0, "Not yet constructed. Construct () should be called before use.");
-
return __keyDerivationFunction.GetHashCode() + __messageAuthScheme.GetHashCode();
}
pOut->Flip();
- if (IsFailed(r))
- {
- pOut.reset(null);
- }
return pOut.release();
}
ClearLastResult();
+ SysAssertf(__password.GetPointer() != null, "Not yet constructed. Construct () should be called before use.");
+ SysAssertf(__password.GetRemaining() > 0, "Not yet constructed. Construct () should be called before use.");
+
SysTryReturn(NID_SEC_CRYPTO, params.GetKeyDerivationAlgorithm().GetAlgorithmObjectId().GetLength() > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
SysTryReturn(NID_SEC_CRYPTO, params.GetEncryptionScheme().GetAlgorithmObjectId().GetLength() > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
ClearLastResult();
+ SysAssertf(__password.GetPointer() != null, "Not yet constructed. Construct () should be called before use.");
+ SysAssertf(__password.GetRemaining() > 0, "Not yet constructed. Construct () should be called before use.");
+
SysTryReturn(NID_SEC_CRYPTO, params.GetKeyDerivationAlgorithm().GetAlgorithmObjectId().GetLength() > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
SysTryReturn(NID_SEC_CRYPTO, params.GetEncryptionScheme().GetAlgorithmObjectId().GetLength() > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
ClearLastResult();
+ SysAssertf(__password.GetPointer() != null, "Not yet constructed. Construct () should be called before use.");
+ SysAssertf(__password.GetRemaining() > 0, "Not yet constructed. Construct () should be called before use.");
+
SysTryReturn(NID_SEC_CRYPTO, params.GetKeyDerivationAlgorithm().GetAlgorithmObjectId().GetLength() > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
SysTryReturn(NID_SEC_CRYPTO, params.GetMacAlgorithm().GetAlgorithmObjectId().GetLength() > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
pOutput->Flip();
- if (IsFailed(r))
- {
- pOutput.reset(null);
- }
return pOutput.release();
}
ClearLastResult();
+ SysAssertf(__password.GetPointer() != null, "Not yet constructed. Construct () should be called before use.");
+ SysAssertf(__password.GetRemaining() > 0, "Not yet constructed. Construct () should be called before use.");
+
SysTryReturn(NID_SEC_CRYPTO, params.GetKeyDerivationAlgorithm().GetAlgorithmObjectId().GetLength() > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
SysTryReturn(NID_SEC_CRYPTO, params.GetMacAlgorithm().GetAlgorithmObjectId().GetLength() > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
int prf_nid = 0;
SysAssertf(__encryptedData.GetRemaining() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
- SysAssertf(__encryptionAlgorithm.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
pBuffer = encodedData.GetPointer();
SysTryReturnResult(NID_SEC_CRYPTO, pBuffer != null, E_INVALID_ARG, "The specified input parameter is invalid.");
result r = E_SUCCESS;
SysAssertf(__encryptedData.GetRemaining() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
- SysAssertf(__encryptionAlgorithm.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
SysTryReturn(NID_SEC_CRYPTO, encryptedData.GetRemaining() > 0, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
result r = E_SUCCESS;
SysAssertf(__encryptedData.GetRemaining() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
- SysAssertf(__encryptionAlgorithm.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
SysTryReturnResult(NID_SEC_CRYPTO, key.GetRemaining() > 0, E_INVALID_ARG, "The specified input parameter is invalid.");
SysTryReturnResult(NID_SEC_CRYPTO, encodedPrivateKeyInfoBuffer.GetRemaining() > 0, E_INVALID_ARG, "The specified input parameter is invalid.");
X509_ATTRIBUTE* pAttribute = null;
SysAssertf(__privateKey.GetRemaining() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. ");
- SysAssertf(__algorithm.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. ");
-
pBuffer = encodedData.GetPointer();
SysTryReturnResult(NID_SEC_CRYPTO, pBuffer != null, E_INVALID_ARG, "The specified input parameter is invalid.");
result r = E_SUCCESS;
SysAssertf(__privateKey.GetRemaining() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. ");
- SysAssertf(__algorithm.GetAlgorithmObjectId().GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class. ");
-
SysTryReturnResult(NID_SEC_CRYPTO, privKey.GetRemaining() > 0, E_INVALID_ARG, "The specified input parameter is invalid.");
_PkcsUtility::IsParameterSupported(Tizen::Base::String algorithm)
{
if (algorithm == OID_PBKDF2 || algorithm == OID_PBES2 || algorithm == OID_PBMAC1 || algorithm == OID_DES_CBC || algorithm == OID_DES_CBC_EDE3
- || algorithm == OID_AES_128_CBC || algorithm == OID_AES_192_CBC || algorithm == OID_AES_256_CBC || algorithm == OID_RC2_CBC)
+ || algorithm == OID_AES_128_CBC || algorithm == OID_AES_192_CBC || algorithm == OID_AES_256_CBC || algorithm == OID_RC2_CBC)
{
return true;
}
}
}
- return pOutBuffer.release();
+ return pOutBuffer.release();
case _OID_TYPE_RSA_ENCRYPTION:
{
}
}
- return pOutBuffer.release();
+ return pOutBuffer.release();
default:
r = E_UNSUPPORTED_ALGORITHM;
pOutBuffer->Flip();
- CATCH:
+CATCH:
if (IsFailed(r))
{
PBKDF2PARAM_free(pKdf);
return pKeyfunc;
- CATCH:
+CATCH:
PBKDF2PARAM_free(pKdf);
X509_ALGOR_free(pKeyfunc);
switch (oidValue)
{
case _OID_TYPE_DES_CBC:
- // fall through
+ // fall through
case _OID_TYPE_DES_CBC_EDE3:
- // fall through
+ // fall through
case _OID_TYPE_AES_128_CBC:
- // fall through
+ // fall through
case _OID_TYPE_AES_192_CBC:
- // fall through
+ // fall through
case _OID_TYPE_AES_256_CBC:
{
X509_ALGOR_get0(&pAlgoObj->algorithm, &pType, &pVal, pAlgoObj);
break;
case _OID_TYPE_HMAC_SHA1:
- // fall through
+ // fall through
case _OID_TYPE_HMAC_SHA2_224:
- // fall through
+ // fall through
case _OID_TYPE_HMAC_SHA2_256:
- // fall through
+ // fall through
case _OID_TYPE_HMAC_SHA2_384:
- // fall through
+ // fall through
case _OID_TYPE_HMAC_SHA2_512:
- // fall through
+ // fall through
case _OID_TYPE_RSA_ENCRYPTION:
{
pAlgoParams = null;
switch (oidValue)
{
case _OID_TYPE_DES_CBC:
- // fall through
+ // fall through
case _OID_TYPE_DES_CBC_EDE3:
- // fall through
+ // fall through
case _OID_TYPE_AES_128_CBC:
- // fall through
+ // fall through
case _OID_TYPE_AES_192_CBC:
- // fall through
+ // fall through
case _OID_TYPE_AES_256_CBC:
{
- SysTryReturn(NID_SEC_CRYPTO, pAlgoParam != null, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, pAlgoParam != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+
+ SysTryCatch(NID_SEC_CRYPTO, dynamic_cast< InitialVector* >(pAlgoParam) != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
ivBuffer.Construct(((dynamic_cast< InitialVector* >(pAlgoParam))->GetInitialVector()));
- SysTryReturn(NID_SEC_CRYPTO, ivBuffer.GetRemaining() > 0, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_SEC_CRYPTO, ivBuffer.GetRemaining() > 0, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pIv = ASN1_STRING_new();
- SysTryReturn(NID_SEC_CRYPTO, pIv != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_SEC_CRYPTO, pIv != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pIv->data = static_cast< unsigned char* >(OPENSSL_malloc(ivBuffer.GetRemaining()));
- SysTryReturn(NID_SEC_CRYPTO, pIv->data != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_SEC_CRYPTO, pIv->data != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
memcpy(pIv->data, ivBuffer.GetPointer(), ivBuffer.GetRemaining());
pIv->length = ivBuffer.GetRemaining();
ret = X509_ALGOR_set0(pAlgoObj, OBJ_nid2obj(algoNid), V_ASN1_OCTET_STRING, reinterpret_cast< void* >(pIv));
- SysTryReturn(NID_SEC_CRYPTO, ret > 0, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, ret > 0, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
}
break;
case _OID_TYPE_RC2_CBC:
{
- SysTryReturn(NID_SEC_CRYPTO, pAlgoParam != null, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, pAlgoParam != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+
+ SysTryCatch(NID_SEC_CRYPTO, dynamic_cast< Rc2CbcParameters* >(pAlgoParam) != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
ivBuffer.Construct(((dynamic_cast< Rc2CbcParameters* >(pAlgoParam))->GetInitialVector()));
- SysTryReturn(NID_SEC_CRYPTO, ivBuffer.GetRemaining() > 0, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_SEC_CRYPTO, ivBuffer.GetRemaining() > 0, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
version = (dynamic_cast< Rc2CbcParameters* >(pAlgoParam))->GetVersion();
if (version == 0)
{
pIv = ASN1_STRING_new();
- SysTryReturn(NID_SEC_CRYPTO, pIv != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_SEC_CRYPTO, pIv != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
pIv->data = static_cast< unsigned char* >(OPENSSL_malloc(ivBuffer.GetRemaining()));
- SysTryReturn(NID_SEC_CRYPTO, pIv->data != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_SEC_CRYPTO, pIv->data != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
memcpy(pIv->data, ivBuffer.GetPointer(), ivBuffer.GetRemaining());
pIv->length = ivBuffer.GetRemaining();
ret = X509_ALGOR_set0(pAlgoObj, OBJ_nid2obj(algoNid), V_ASN1_OCTET_STRING, reinterpret_cast< void* >(pIv));
- SysTryReturn(NID_SEC_CRYPTO, ret > 0, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, ret > 0, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
}
else
{
pAsn1Type = ASN1_TYPE_new();
- SysTryReturn(NID_SEC_CRYPTO, pAsn1Type != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_SEC_CRYPTO, pAsn1Type != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
ret = ASN1_TYPE_set_int_octetstring(pAsn1Type, version, const_cast< unsigned char* >(ivBuffer.GetPointer()), ivBuffer.GetRemaining());
- SysTryReturn(NID_SEC_CRYPTO, ret > 0, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, ret > 0, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
ret = X509_ALGOR_set0(pAlgoObj, OBJ_nid2obj(algoNid), V_ASN1_SEQUENCE, reinterpret_cast< void* >(pAsn1Type->value.ptr));
- SysTryReturn(NID_SEC_CRYPTO, ret > 0, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, ret > 0, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
}
break;
case _OID_TYPE_HMAC_SHA1:
- // fall through
+ // fall through
case _OID_TYPE_HMAC_SHA2_224:
- // fall through
+ // fall through
case _OID_TYPE_HMAC_SHA2_256:
- // fall through
+ // fall through
case _OID_TYPE_HMAC_SHA2_384:
- // fall through
+ // fall through
case _OID_TYPE_RSA_ENCRYPTION:
- // fall through
+ // fall through
case _OID_TYPE_HMAC_SHA2_512:
{
ret = X509_ALGOR_set0(pAlgoObj, OBJ_nid2obj(algoNid), V_ASN1_NULL, NULL);
- SysTryReturn(NID_SEC_CRYPTO, ret > 0, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, ret > 0, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
}
break;
case _OID_TYPE_PBKDF2:
{
- SysTryReturn(NID_SEC_CRYPTO, pAlgoParam != null, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, pAlgoParam != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, dynamic_cast< Pkcs05PbKdf2Parameters* >(pAlgoParam) != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
std::unique_ptr< ByteBuffer > pKdfBuffer((dynamic_cast< Pkcs05PbKdf2Parameters* >(pAlgoParam))->GetEncodedDataN());
if (pKdfBuffer == null)
r = GetLastResult();
if (r == E_OUT_OF_MEMORY)
{
- SysTryReturn(NID_SEC_CRYPTO, pKdfBuffer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_SEC_CRYPTO, pKdfBuffer, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
}
else
{
- SysTryReturn(NID_SEC_CRYPTO, pKdfBuffer, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, pKdfBuffer, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
}
}
pBuf = pKdfBuffer->GetPointer();
- SysTryReturn(NID_SEC_CRYPTO, pBuf != null, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, pBuf != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
pKdf = d2i_PBKDF2PARAM(null, reinterpret_cast< const unsigned char** >(&pBuf), pKdfBuffer->GetRemaining());
- SysTryReturn(NID_SEC_CRYPTO, pKdf != null, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, pKdf != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
ASN1_item_pack(pKdf, ASN1_ITEM_rptr(PBKDF2PARAM), &pbKdf2Str);
- SysTryReturn(NID_SEC_CRYPTO, pbKdf2Str != null, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, pbKdf2Str != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
ret = X509_ALGOR_set0(pAlgoObj, OBJ_nid2obj(algoNid), V_ASN1_SEQUENCE, pbKdf2Str);
- SysTryReturn(NID_SEC_CRYPTO, ret > 0, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, ret > 0, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
}
break;
case _OID_TYPE_PBES2:
{
- SysTryReturn(NID_SEC_CRYPTO, pAlgoParam != null, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, pAlgoParam != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, dynamic_cast< Pkcs05PbEs2Parameters* >(pAlgoParam) != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
std::unique_ptr< ByteBuffer > pbEs2Buffer((dynamic_cast< Pkcs05PbEs2Parameters* >(pAlgoParam))->GetEncodedDataN());
if (pbEs2Buffer == null)
r = GetLastResult();
if (r == E_OUT_OF_MEMORY)
{
- SysTryReturn(NID_SEC_CRYPTO, pbEs2Buffer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_SEC_CRYPTO, pbEs2Buffer, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
}
else
{
- SysTryReturn(NID_SEC_CRYPTO, pbEs2Buffer, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, pbEs2Buffer, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
}
}
pBuf = pbEs2Buffer->GetPointer();
- SysTryReturn(NID_SEC_CRYPTO, pBuf != null, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, pBuf != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
pPbes2Obj = d2i_PBE2PARAM(null, reinterpret_cast< const unsigned char** >(&pBuf), pbEs2Buffer->GetRemaining());
- SysTryReturn(NID_SEC_CRYPTO, pPbes2Obj != null, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, pPbes2Obj != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
ASN1_item_pack(pPbes2Obj, ASN1_ITEM_rptr(PBE2PARAM), &pbE2Str);
ret = X509_ALGOR_set0(pAlgoObj, OBJ_nid2obj(algoNid), V_ASN1_SEQUENCE, pbE2Str);
- SysTryReturn(NID_SEC_CRYPTO, pbE2Str != null, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, pbE2Str != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
- SysTryReturn(NID_SEC_CRYPTO, ret > 0, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, ret > 0, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
}
break;
case _OID_TYPE_PBMAC1:
{
- SysTryReturn(NID_SEC_CRYPTO, pAlgoParam != null, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, pAlgoParam != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, dynamic_cast< Pkcs05PbMacParameters* >(pAlgoParam) != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
std::unique_ptr< ByteBuffer > pbMacBuffer((dynamic_cast< Pkcs05PbMacParameters* >(pAlgoParam))->GetEncodedDataN());
if (pbMacBuffer == null)
r = GetLastResult();
if (r == E_OUT_OF_MEMORY)
{
- SysTryReturn(NID_SEC_CRYPTO, pbMacBuffer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+ SysTryCatch(NID_SEC_CRYPTO, pbMacBuffer, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
}
else
{
- SysTryReturn(NID_SEC_CRYPTO, pbMacBuffer, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, pbMacBuffer, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
}
}
pBuf = pbMacBuffer->GetPointer();
- SysTryReturn(NID_SEC_CRYPTO, pBuf != null, null, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+ SysTryCatch(NID_SEC_CRYPTO, pBuf != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
pMacObj = d2i_PBE2PARAM(null, reinterpret_cast< const unsigned char** >(&pBuf), pbMacBuffer->GetRemaining());
- SysTryReturn(NID_SEC_CRYPTO, pMacObj != null, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, pMacObj != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
ASN1_item_pack(pMacObj, ASN1_ITEM_rptr(PBE2PARAM), &pbE2Str);
ret = X509_ALGOR_set0(pAlgoObj, OBJ_nid2obj(algoNid), V_ASN1_SEQUENCE, pbE2Str);
- SysTryReturn(NID_SEC_CRYPTO, ret > 0, null, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
+ SysTryCatch(NID_SEC_CRYPTO, ret > 0, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The method cannot proceed due to a severe system error.");
}
break;
break;
}
+CATCH:
+
+ if (IsFailed(r))
+ {
+ X509_ALGOR_free(pAlgoObj);
+ if (pIv != null)
+ {
+ ASN1_STRING_free(pIv);
+ }
+
+ if (pAsn1Type != null)
+ {
+ ASN1_TYPE_free(pAsn1Type);
+ }
+ if (pKdf != null)
+ {
+ PBKDF2PARAM_free(pKdf);
+ }
+
+ if (pPbes2Obj != null)
+ {
+ PBE2PARAM_free(pPbes2Obj);
+ }
+
+ if (pMacObj != null)
+ {
+ PBE2PARAM_free(pMacObj);
+ }
+
+ return null;
+ }
return pAlgoObj;
}