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