Browse Source

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 7 years ago
parent
commit
dbcfb88168
1 changed files with 1 additions and 1 deletions
  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");