diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-10-08 11:02:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-10-10 08:51:14 +0100 |
commit | b2aa7673de144df737374b9173b5539f36f6a533 (patch) | |
tree | 139fda3615eb6e436efe5c044efceb7447b6974a /xmlsecurity | |
parent | 625d5639cb983d35179747b29b5f54e50ade929a (diff) |
ByteString->rtl::OString
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index cb740e5d3ede..6842a698fe08 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -135,11 +135,13 @@ char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ ) if ( pPasswordRequest->isPassword() ) { - ByteString aPassword = ByteString( String( pPasswordRequest->getPassword() ), gsl_getSystemTextEncoding() ); - sal_uInt16 nLen = aPassword.Len(); + rtl::OString aPassword(rtl::OUStringToOString( + pPasswordRequest->getPassword(), + osl_getThreadTextEncoding())); + sal_Int32 nLen = aPassword.getLength(); char* pPassword = (char*) PORT_Alloc( nLen+1 ) ; pPassword[nLen] = 0; - memcpy( pPassword, aPassword.GetBuffer(), nLen ); + memcpy( pPassword, aPassword.getStr(), nLen ); return pPassword; } } |