equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
408 return 0; |
408 return 0; |
409 } |
409 } |
410 } |
410 } |
411 |
411 |
412 int len = ConvertMultiByteToWideChar((LPSTR)UTF8Str, strlen((LPSTR)UTF8Str)+1, NULL, 0); |
412 int len = ConvertMultiByteToWideChar((LPSTR)UTF8Str, strlen((LPSTR)UTF8Str)+1, NULL, 0); |
|
413 #ifndef __TOOLS2_LINUX__ |
413 *aNameEntry = new wchar_t[len*sizeof(wchar_t)]; |
414 *aNameEntry = new wchar_t[len*sizeof(wchar_t)]; |
414 ConvertMultiByteToWideChar((LPSTR)UTF8Str, strlen((LPSTR)UTF8Str)+1, *aNameEntry, len); |
415 ConvertMultiByteToWideChar((LPSTR)UTF8Str, strlen((LPSTR)UTF8Str)+1, *aNameEntry, len); |
|
416 #else |
|
417 int tmplen = (len*sizeof(wchar_t))/2; |
|
418 *aNameEntry = new wchar_t[tmplen]; |
|
419 ConvertMultiByteToWideChar((LPSTR)UTF8Str, strlen((LPSTR)UTF8Str)+1, *aNameEntry, len*2); |
|
420 #endif |
415 return 1; |
421 return 1; |
416 } |
422 } |
417 |
423 |
418 std::string CCertificateInfo::Get_ASN1_STRING_Data(ASN1_STRING *aASN1String) |
424 std::string CCertificateInfo::Get_ASN1_STRING_Data(ASN1_STRING *aASN1String) |
419 { |
425 { |