remove duplicated else if condition (#11370)

This commit is contained in:
William Cheng 2022-01-21 19:00:59 +08:00 committed by GitHub
parent b7c8de9425
commit 20bf0c73f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 0 additions and 63 deletions

View File

@ -741,15 +741,6 @@ namespace {{packageName}}.Client
{
keyType = PrivateKeyType.ECDSA;
}
else if (key[0].Contains(ecPrivateKeyHeader) &&
key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter))
{
// this type of key can hold many type different types of private key, but here due lack of pem header
// Considering this as EC key
//TODO :- update the key based on oid
keyType = PrivateKeyType.ECDSA;
}
else
{
throw new Exception("Either the key is invalid or key is not supported");

View File

@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
{
keyType = PrivateKeyType.ECDSA;
}
else if (key[0].Contains(ecPrivateKeyHeader) &&
key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter))
{
// this type of key can hold many type different types of private key, but here due lack of pem header
// Considering this as EC key
//TODO :- update the key based on oid
keyType = PrivateKeyType.ECDSA;
}
else
{
throw new Exception("Either the key is invalid or key is not supported");

View File

@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
{
keyType = PrivateKeyType.ECDSA;
}
else if (key[0].Contains(ecPrivateKeyHeader) &&
key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter))
{
// this type of key can hold many type different types of private key, but here due lack of pem header
// Considering this as EC key
//TODO :- update the key based on oid
keyType = PrivateKeyType.ECDSA;
}
else
{
throw new Exception("Either the key is invalid or key is not supported");

View File

@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
{
keyType = PrivateKeyType.ECDSA;
}
else if (key[0].Contains(ecPrivateKeyHeader) &&
key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter))
{
// this type of key can hold many type different types of private key, but here due lack of pem header
// Considering this as EC key
//TODO :- update the key based on oid
keyType = PrivateKeyType.ECDSA;
}
else
{
throw new Exception("Either the key is invalid or key is not supported");

View File

@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
{
keyType = PrivateKeyType.ECDSA;
}
else if (key[0].Contains(ecPrivateKeyHeader) &&
key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter))
{
// this type of key can hold many type different types of private key, but here due lack of pem header
// Considering this as EC key
//TODO :- update the key based on oid
keyType = PrivateKeyType.ECDSA;
}
else
{
throw new Exception("Either the key is invalid or key is not supported");

View File

@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
{
keyType = PrivateKeyType.ECDSA;
}
else if (key[0].Contains(ecPrivateKeyHeader) &&
key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter))
{
// this type of key can hold many type different types of private key, but here due lack of pem header
// Considering this as EC key
//TODO :- update the key based on oid
keyType = PrivateKeyType.ECDSA;
}
else
{
throw new Exception("Either the key is invalid or key is not supported");

View File

@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
{
keyType = PrivateKeyType.ECDSA;
}
else if (key[0].Contains(ecPrivateKeyHeader) &&
key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter))
{
// this type of key can hold many type different types of private key, but here due lack of pem header
// Considering this as EC key
//TODO :- update the key based on oid
keyType = PrivateKeyType.ECDSA;
}
else
{
throw new Exception("Either the key is invalid or key is not supported");