mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-08 00:02:03 -04:00
Some whitespace fixes.
This commit is contained in:
parent
e41932320c
commit
0a4dc78755
@ -249,7 +249,7 @@ static bool get_encoding(private_openssl_ec_private_key_t *this,
|
|||||||
NULL, encoding, KEY_PART_ECDSA_PRIV_ASN1_DER,
|
NULL, encoding, KEY_PART_ECDSA_PRIV_ASN1_DER,
|
||||||
asn1_encoding, KEY_PART_END);
|
asn1_encoding, KEY_PART_END);
|
||||||
chunk_clear(&asn1_encoding);
|
chunk_clear(&asn1_encoding);
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -264,7 +264,7 @@ static bool get_encoding(private_openssl_ec_public_key_t *this,
|
|||||||
NULL, encoding, KEY_PART_ECDSA_PUB_ASN1_DER,
|
NULL, encoding, KEY_PART_ECDSA_PUB_ASN1_DER,
|
||||||
asn1_encoding, KEY_PART_END);
|
asn1_encoding, KEY_PART_END);
|
||||||
chunk_clear(&asn1_encoding);
|
chunk_clear(&asn1_encoding);
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -242,7 +242,7 @@ static bool get_encoding(private_openssl_rsa_private_key_t *this,
|
|||||||
NULL, encoding, KEY_PART_RSA_PRIV_ASN1_DER,
|
NULL, encoding, KEY_PART_RSA_PRIV_ASN1_DER,
|
||||||
asn1_encoding, KEY_PART_END);
|
asn1_encoding, KEY_PART_END);
|
||||||
chunk_clear(&asn1_encoding);
|
chunk_clear(&asn1_encoding);
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -247,7 +247,7 @@ static bool get_encoding(private_openssl_rsa_public_key_t *this,
|
|||||||
NULL, encoding, KEY_PART_RSA_PUB_ASN1_DER,
|
NULL, encoding, KEY_PART_RSA_PUB_ASN1_DER,
|
||||||
asn1_encoding, KEY_PART_END);
|
asn1_encoding, KEY_PART_END);
|
||||||
chunk_clear(&asn1_encoding);
|
chunk_clear(&asn1_encoding);
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
case KEY_PUB_ASN1_DER:
|
case KEY_PUB_ASN1_DER:
|
||||||
|
@ -60,7 +60,7 @@ bool pem_encoder_encode(key_encoding_type_t type, chunk_t *encoding,
|
|||||||
|
|
||||||
/* compute and allocate maximum size of PEM object */
|
/* compute and allocate maximum size of PEM object */
|
||||||
pem_chars = 4*(asn1.len + 2)/3;
|
pem_chars = 4*(asn1.len + 2)/3;
|
||||||
pem_lines = (asn1.len + BYTES_PER_LINE - 1) / BYTES_PER_LINE;
|
pem_lines = (asn1.len + BYTES_PER_LINE - 1) / BYTES_PER_LINE;
|
||||||
*encoding = chunk_alloc(5 + 2*(6 + strlen(label) + 6) + 3 + pem_chars + pem_lines);
|
*encoding = chunk_alloc(5 + 2*(6 + strlen(label) + 6) + 3 + pem_chars + pem_lines);
|
||||||
pos = encoding->ptr;
|
pos = encoding->ptr;
|
||||||
len = encoding->len;
|
len = encoding->len;
|
||||||
@ -68,7 +68,7 @@ bool pem_encoder_encode(key_encoding_type_t type, chunk_t *encoding,
|
|||||||
/* write PEM header */
|
/* write PEM header */
|
||||||
written = snprintf(pos, len, "-----BEGIN %s-----\n", label);
|
written = snprintf(pos, len, "-----BEGIN %s-----\n", label);
|
||||||
pos += written;
|
pos += written;
|
||||||
len -= written;
|
len -= written;
|
||||||
|
|
||||||
/* write PEM body */
|
/* write PEM body */
|
||||||
while (pem_lines--)
|
while (pem_lines--)
|
||||||
@ -89,10 +89,10 @@ bool pem_encoder_encode(key_encoding_type_t type, chunk_t *encoding,
|
|||||||
/* write PEM trailer */
|
/* write PEM trailer */
|
||||||
written = snprintf(pos, len, "-----END %s-----", label);
|
written = snprintf(pos, len, "-----END %s-----", label);
|
||||||
pos += written;
|
pos += written;
|
||||||
len -= written;
|
len -= written;
|
||||||
|
|
||||||
/* replace termination null character with newline */
|
/* replace termination null character with newline */
|
||||||
*pos = '\n';
|
*pos = '\n';
|
||||||
pos++;
|
pos++;
|
||||||
len--;
|
len--;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user