CSymbianKeyStore Class Reference
class CSymbianKeyStore : public CActive |
Public Member Functions |
---|
| ~CSymbianKeyStore() |
IMPORT_C void | CreateRSAKey(TUint, const TDesC8 &) |
IMPORT_C void | CreateUnifiedKeyStoreL() |
void | ExportRSAPublicKeyL() |
IMPORT_C void | FindKey(const TDesC8 &, CKeyInfoBase::EKeyAlgorithm) |
IMPORT_C TInt | GetError() |
IMPORT_C CCTKeyInfo::EKeyAlgorithm | GetKeyAlgorithm() |
IMPORT_C TUint | GetKeySize() |
IMPORT_C const TUint8 * | GetSignedData(TUint *) |
IMPORT_C TBool | GetVerifyResult() |
IMPORT_C void | ImportKey(const TDesC8 &, const TDesC8 &) |
IMPORT_C CSymbianKeyStore * | NewL() |
IMPORT_C CSymbianKeyStore * | NewLC() |
void | PerformRSASignOperation() |
void | PerformRSAVerifyOperationL() |
IMPORT_C void | RSASignL(const TUint8 *, TUint) |
IMPORT_C void | RSAVerifyL(const TUint8 *, TUint, const TUint8 *, TUint) |
IMPORT_C TBool | RSAVerifyWithPublicKeyL(const TUint8 *, TUint, const TUint8 *, TUint, CSubjectPublicKeyInfo *) |
IMPORT_C TInt | hasKey() |
Constructor & Destructor Documentation
CSymbianKeyStore()
CSymbianKeyStore | ( | ) | [private] |
~CSymbianKeyStore()
~CSymbianKeyStore | ( | ) | [virtual] |
Member Functions Documentation
ConstructL()
void | ConstructL | ( | ) | [private] |
By default Symbian 2nd phase constructor is private.
CreateRSAKey(TUint, const TDesC8 &)
IMPORT_C void | CreateRSAKey | ( | TUint | aSize, |
| const TDesC8 & | aKeyName |
| ) | |
Parameters
TUint aSize | Bit size of the key |
const TDesC8 & aKeyName | Name of the key |
CreateUnifiedKeyStoreL()
IMPORT_C void | CreateUnifiedKeyStoreL | ( | ) | |
DoCancel()
void | DoCancel | ( | ) | [protected, virtual] |
This function is called as part of the active object's Cancel().
ExportRSAPublicKeyL()
void | ExportRSAPublicKeyL | ( | ) | |
Export public key if none present
FindKey(const TDesC8 &, CKeyInfoBase::EKeyAlgorithm)
Find a key in the Unified Key Store
FindMatchedKey()
void | FindMatchedKey | ( | ) | [private] |
To find matched key in the phase EFindingKeys
GetKeyAlgorithm()
Get the algorithm of the key stored
GetKeySize()
IMPORT_C TUint | GetKeySize | ( | ) | |
Get the size of the key stored
GetRSASignatureL()
void | GetRSASignatureL | ( | ) | [private] |
GetSignedData(TUint *)
Parameters
TUint * aLen | sets length of signed data |
GetVerifyResult()
IMPORT_C TBool | GetVerifyResult | ( | ) | |
ImportKey(const TDesC8 &, const TDesC8 &)
IMPORT_C void | ImportKey | ( | const TDesC8 & | aKeyData, |
| const TDesC8 & | aKeyName |
| ) | |
Parameters
const TDesC8 & aKeyData | The key data to import, ASN.1 DER encoded PKCS#8 Name of the key |
const TDesC8 & aKeyName | |
NewLC()
Create new object and put it on clean stack.
PerformRSASignOperation()
void | PerformRSASignOperation | ( | ) | |
Perform RSA sign operation
PerformRSAVerifyOperationL()
void | PerformRSAVerifyOperationL | ( | ) | |
Perform RSA verify operation
RSASignL(const TUint8 *, TUint)
IMPORT_C void | RSASignL | ( | const TUint8 * | aDataToSign, |
| TUint | aLen |
| ) | |
Opens RSA key for signing the data
Parameters
const TUint8 * aDataToSign | The data to be signed |
TUint aLen | Length of the data |
RSAVerifyL(const TUint8 *, TUint, const TUint8 *, TUint)
Parameters
const TUint8 * aDataToVerify | The signed data to be verified |
TUint aDataLen | Length of the signed data |
const TUint8 * aSig | A reference to the signature that signed the data |
TUint aSigLen | Length of the signature |
RSAVerifyWithPublicKeyL(const TUint8 *, TUint, const TUint8 *, TUint, CSubjectPublicKeyInfo *)
Verify an RSA signed data with a public key passed from a certificate
Parameters
const TUint8 * aDataToVerify | The signed data to be verified |
TUint aDataLen | Length of the signed data |
const TUint8 * aSig | A reference to the signature that signed the data |
TUint aSigLen | Length of the signature |
CSubjectPublicKeyInfo * aSubPubKeyInfo | A handle to the public key passed from a certificate |
ResetAndDestroyKeysArray()
void | ResetAndDestroyKeysArray | ( | ) | [private] |
Release all resources kept in iKeys array (exept for iKey which is released separetly) and empty iKeys array
RunError(TInt)
TInt
| RunError | ( | TInt | aError | ) | [protected, virtual] |
Handles Leaves from RunL function.
RunL()
void | RunL | ( | ) | [protected, virtual] |
From CActive Callback function, invoked to handle responses from the server
hasKey()
Check if a key is found in the Unified Key Store
Member Enumerations Documentation
Enum TState
State of active object. EUnitialized standard state EInitializingKeystore during initialize keystore EFindingKeys during finding keys ECreateKey during creating key EImportKey during importing key EOpenRsaKeyForSigning during preparing key for signing EPerformRSASignOperation during signing EExportPublic during exporting public key
Enumerators
EUnitialized | |
EInitializingKeystore | |
EFindingKeys | |
ECreateKey | |
EImportKey | |
EOpenRSAKeyForSigning | |
EPerformRSASignOperation | |
EExportPublic | |
Member Data Documentation
HBufC8 * iDataToSign
Store the data to be signed
HBufC8 * iDataToVerify
HBufC8 * | iDataToVerify | [private] |
Store the data to be verified
RFs
iFs
A reference to the File Server Client
HBufC * iKeyLabelToFind
HBufC * | iKeyLabelToFind | [private] |
To store the key label to find
CUnifiedKeyStore * iKeyStore
RMPointerArray< CCTKeyInfo > iKeys
TBool
iOutOfMemoryFlag
TBool
| iOutOfMemoryFlag | [private] |
To check if it was out of memory during previous verify operation
HBufC8 * iPublicKeyData
HBufC8 * | iPublicKeyData | [private] |
Contain the exported public key
CRSASignature * iRSASignature
Contain the result of the RSA Signer
HBufC8 * iSignature
Store the signed signature
TBool
iVerifyResult
TBool
| iVerifyResult | [private] |
Store the result of signature verification
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.