Explorar o código

as we now have a call to get the uid, we shall not split the string, as usernames as such are valid: tobi@nc

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky %!s(int64=7) %!d(string=hai) anos
pai
achega
dbcfb88168
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/main/java/com/owncloud/android/utils/CsrHelper.java

+ 1 - 1
src/main/java/com/owncloud/android/utils/CsrHelper.java

@@ -58,7 +58,7 @@ public class CsrHelper {
      */
     private static PKCS10CertificationRequest generateCSR(KeyPair keyPair, String userId) throws IOException,
     OperatorCreationException {
-        String principal = "CN=" + userId.split("@")[0];
+        String principal = "CN=" + userId;
         AsymmetricKeyParameter privateKey = PrivateKeyFactory.createKey(keyPair.getPrivate().getEncoded());
         AlgorithmIdentifier signatureAlgorithm = new DefaultSignatureAlgorithmIdentifierFinder().find("SHA1WITHRSA");
         AlgorithmIdentifier digestAlgorithm = new DefaultDigestAlgorithmIdentifierFinder().find("SHA-1");