summary refs log tree commit diff
path: root/crypto/src/util/io/pem/PemReader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/util/io/pem/PemReader.cs')
-rw-r--r--crypto/src/util/io/pem/PemReader.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/src/util/io/pem/PemReader.cs b/crypto/src/util/io/pem/PemReader.cs
index b3284705d..bf712b6de 100644
--- a/crypto/src/util/io/pem/PemReader.cs
+++ b/crypto/src/util/io/pem/PemReader.cs
@@ -35,7 +35,7 @@ namespace Org.BouncyCastle.Utilities.IO.Pem
 		{
 			string line = reader.ReadLine();
 
-			if (line != null && line.StartsWith(BeginString))
+            if (line != null && Platform.StartsWith(line, BeginString))
 			{
 				line = line.Substring(BeginString.Length);
 				int index = line.IndexOf('-');
@@ -56,7 +56,7 @@ namespace Org.BouncyCastle.Utilities.IO.Pem
 
 			string line;
 			while ((line = reader.ReadLine()) != null
-				&& line.IndexOf(endMarker) == -1)
+                && Platform.IndexOf(line, endMarker) == -1)
 			{
 				int colonPos = line.IndexOf(':');
 
@@ -69,8 +69,10 @@ namespace Org.BouncyCastle.Utilities.IO.Pem
 					// Process field
 					string fieldName = line.Substring(0, colonPos).Trim();
 
-					if (fieldName.StartsWith("X-"))
-						fieldName = fieldName.Substring(2);
+                    if (Platform.StartsWith(fieldName, "X-"))
+                    {
+                        fieldName = fieldName.Substring(2);
+                    }
 
 					string fieldValue = line.Substring(colonPos + 1).Trim();