equal
deleted
inserted
replaced
30 #include <unifiedkeystore.h> |
30 #include <unifiedkeystore.h> |
31 #include <mctwritablecertstore.h> |
31 #include <mctwritablecertstore.h> |
32 #include <charconv.h> |
32 #include <charconv.h> |
33 #include <pkcs10.h> |
33 #include <pkcs10.h> |
34 #include <secdlg.h> |
34 #include <secdlg.h> |
35 |
|
36 #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS |
|
37 #include <PKIDlg.h> |
35 #include <PKIDlg.h> |
38 #endif |
|
39 |
|
40 #include <securityerr.h> |
36 #include <securityerr.h> |
41 |
|
42 |
37 |
43 |
38 |
44 // CONSTANTS |
39 // CONSTANTS |
45 _LIT(KSTSSymbianKeyStoreLabel, "Software key store"); |
40 _LIT(KSTSSymbianKeyStoreLabel, "Software key store"); |
46 _LIT(KSTSSymbianCertificateStoreLabel, "Software certificate store"); |
41 _LIT(KSTSSymbianCertificateStoreLabel, "Software certificate store"); |
69 // Destructor |
64 // Destructor |
70 CSTSCredentialManager::~CSTSCredentialManager() |
65 CSTSCredentialManager::~CSTSCredentialManager() |
71 { |
66 { |
72 delete iEncodedCert; |
67 delete iEncodedCert; |
73 delete iIssuerAndSerialNumber; |
68 delete iIssuerAndSerialNumber; |
74 #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS |
69 |
75 if (iPKIDialog) |
|
76 { |
|
77 iPKIDialog->Release(); |
|
78 } |
|
79 #endif |
|
80 delete iDistinguishedName; |
70 delete iDistinguishedName; |
81 delete iDisplayName; |
71 delete iDisplayName; |
82 delete iRequestEncoded; |
72 delete iRequestEncoded; |
83 delete iRequest; |
73 delete iRequest; |
84 if (iCertInfoArray) |
74 if (iCertInfoArray) |
537 // Symbian 2nd phase constructor can leave. |
527 // Symbian 2nd phase constructor can leave. |
538 // ----------------------------------------------------------------------------- |
528 // ----------------------------------------------------------------------------- |
539 // |
529 // |
540 void CSTSCredentialManager::ConstructL() |
530 void CSTSCredentialManager::ConstructL() |
541 { |
531 { |
542 #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS |
532 |
543 iPKIDialog = PKIDialogFactory::CreateNoteL(); |
|
544 #endif |
|
545 User::LeaveIfError(iFileServer.Connect()); |
533 User::LeaveIfError(iFileServer.Connect()); |
546 iWait = new(ELeave) CActiveSchedulerWait; |
534 iWait = new(ELeave) CActiveSchedulerWait; |
547 iStore = CUnifiedCertStore::NewL(iFileServer, ETrue); |
535 iStore = CUnifiedCertStore::NewL(iFileServer, ETrue); |
548 iKeyStore = CUnifiedKeyStore::NewL(iFileServer); |
536 iKeyStore = CUnifiedKeyStore::NewL(iFileServer); |
549 iStore->Initialize(iStatus); |
537 iStore->Initialize(iStatus); |
624 |
612 |
625 if (iCertInfoArray->Count() == 0) |
613 if (iCertInfoArray->Count() == 0) |
626 { |
614 { |
627 // not found, ok to add |
615 // not found, ok to add |
628 iState = EAddDialog; |
616 iState = EAddDialog; |
629 #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS |
617 |
630 iPKIDialog->SaveCertificate(EX509Certificate, EUserCertificate, |
|
631 iSubject, iStatus); |
|
632 #endif |
|
633 SetActive(); |
618 SetActive(); |
634 return; |
619 return; |
635 } |
620 } |
636 |
621 |
637 |
622 |
727 |
712 |
728 |
713 |
729 CCTCertInfo* certInfo = (*iCertInfoArray)[ 0 ]; |
714 CCTCertInfo* certInfo = (*iCertInfoArray)[ 0 ]; |
730 iState = ERemoveDialog; |
715 iState = ERemoveDialog; |
731 iHandle = certInfo->Handle(); |
716 iHandle = certInfo->Handle(); |
732 #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS |
717 |
733 iPKIDialog->DeleteCertificate(iHandle, iStatus); |
718 |
734 #endif |
|
735 SetActive(); |
719 SetActive(); |
736 } |
720 } |
737 |
721 |
738 |
722 |
739 |
723 |
791 Complete(KErrGeneral); |
775 Complete(KErrGeneral); |
792 return; |
776 return; |
793 } |
777 } |
794 iState = ECSRDialog; |
778 iState = ECSRDialog; |
795 iHandle = iKeyInfo->Handle(); |
779 iHandle = iKeyInfo->Handle(); |
796 #ifndef RD_JAVA_S60_RELEASE_10_1_ONWARDS |
780 |
797 iPKIDialog->CreateCSR(*iDisplayName, iHandle, iStatus); |
781 |
798 #endif |
|
799 SetActive(); |
782 SetActive(); |
800 |
783 |
801 } |
784 } |
802 |
785 |
803 // ----------------------------------------------------------------------------- |
786 // ----------------------------------------------------------------------------- |
1037 { |
1020 { |
1038 |
1021 |
1039 FunctionServer::doServerSideInit(); |
1022 FunctionServer::doServerSideInit(); |
1040 |
1023 |
1041 } |
1024 } |
|
1025 |
|
1026 |