forked from loafle/openapi-generator-original
remove duplicated else if condition (#11370)
This commit is contained in:
parent
b7c8de9425
commit
20bf0c73f8
@ -741,15 +741,6 @@ namespace {{packageName}}.Client
|
|||||||
{
|
{
|
||||||
keyType = PrivateKeyType.ECDSA;
|
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
|
else
|
||||||
{
|
{
|
||||||
throw new Exception("Either the key is invalid or key is not supported");
|
throw new Exception("Either the key is invalid or key is not supported");
|
||||||
|
@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
|
|||||||
{
|
{
|
||||||
keyType = PrivateKeyType.ECDSA;
|
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
|
else
|
||||||
{
|
{
|
||||||
throw new Exception("Either the key is invalid or key is not supported");
|
throw new Exception("Either the key is invalid or key is not supported");
|
||||||
|
@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
|
|||||||
{
|
{
|
||||||
keyType = PrivateKeyType.ECDSA;
|
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
|
else
|
||||||
{
|
{
|
||||||
throw new Exception("Either the key is invalid or key is not supported");
|
throw new Exception("Either the key is invalid or key is not supported");
|
||||||
|
@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
|
|||||||
{
|
{
|
||||||
keyType = PrivateKeyType.ECDSA;
|
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
|
else
|
||||||
{
|
{
|
||||||
throw new Exception("Either the key is invalid or key is not supported");
|
throw new Exception("Either the key is invalid or key is not supported");
|
||||||
|
@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
|
|||||||
{
|
{
|
||||||
keyType = PrivateKeyType.ECDSA;
|
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
|
else
|
||||||
{
|
{
|
||||||
throw new Exception("Either the key is invalid or key is not supported");
|
throw new Exception("Either the key is invalid or key is not supported");
|
||||||
|
@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
|
|||||||
{
|
{
|
||||||
keyType = PrivateKeyType.ECDSA;
|
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
|
else
|
||||||
{
|
{
|
||||||
throw new Exception("Either the key is invalid or key is not supported");
|
throw new Exception("Either the key is invalid or key is not supported");
|
||||||
|
@ -749,15 +749,6 @@ namespace Org.OpenAPITools.Client
|
|||||||
{
|
{
|
||||||
keyType = PrivateKeyType.ECDSA;
|
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
|
else
|
||||||
{
|
{
|
||||||
throw new Exception("Either the key is invalid or key is not supported");
|
throw new Exception("Either the key is invalid or key is not supported");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user