tls_set_certificate_pem()/tls_set_certificate_der(): minor format adjustments
This commit is contained in:
parent
1ff344dbd9
commit
718583f8a9
2 changed files with 10 additions and 8 deletions
|
@ -35,10 +35,10 @@ int tls_alloc(struct tls **tlsp, enum tls_method method, const char *keyfile,
|
|||
int tls_add_ca(struct tls *tls, const char *capath);
|
||||
int tls_set_selfsigned(struct tls *tls, const char *cn);
|
||||
int tls_set_certificate_pem(struct tls *tls, const char *cert, size_t len_cert,
|
||||
const char *key, size_t len_key);
|
||||
int tls_set_certificate_der(struct tls *tls, enum tls_keytype key_type,
|
||||
const uint8_t *cert, size_t len_cert, const uint8_t *key,
|
||||
size_t len_key);
|
||||
const char *key, size_t len_key);
|
||||
int tls_set_certificate_der(struct tls *tls, enum tls_keytype keytype,
|
||||
const uint8_t *cert, size_t len_cert,
|
||||
const uint8_t *key, size_t len_key);
|
||||
int tls_set_certificate(struct tls *tls, const char *cert, size_t len);
|
||||
void tls_set_verify_client(struct tls *tls);
|
||||
int tls_set_srtp(struct tls *tls, const char *suites);
|
||||
|
|
|
@ -361,7 +361,7 @@ int tls_set_selfsigned(struct tls *tls, const char *cn)
|
|||
* @return 0 if success, otherwise errorcode
|
||||
*/
|
||||
int tls_set_certificate_pem(struct tls *tls, const char *cert, size_t len_cert,
|
||||
const char *key, size_t len_key)
|
||||
const char *key, size_t len_key)
|
||||
{
|
||||
BIO *bio = NULL, *kbio = NULL;
|
||||
X509 *x509 = NULL;
|
||||
|
@ -419,11 +419,12 @@ int tls_set_certificate_pem(struct tls *tls, const char *cert, size_t len_cert,
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the certificate and private key on a TLS context
|
||||
*
|
||||
* @param tls TLS Context
|
||||
* @param keytype Private key type
|
||||
* @param keytype Private key type
|
||||
* @param cert Certificate in DER format
|
||||
* @param len_cert Length of certificate DER bytes
|
||||
* @param key Private key in DER format, will be read from cert if NULL
|
||||
|
@ -432,8 +433,8 @@ int tls_set_certificate_pem(struct tls *tls, const char *cert, size_t len_cert,
|
|||
* @return 0 if success, otherwise errorcode
|
||||
*/
|
||||
int tls_set_certificate_der(struct tls *tls, enum tls_keytype keytype,
|
||||
const uint8_t *cert, size_t len_cert, const uint8_t *key,
|
||||
size_t len_key)
|
||||
const uint8_t *cert, size_t len_cert,
|
||||
const uint8_t *key, size_t len_key)
|
||||
{
|
||||
const uint8_t *buf_cert;
|
||||
X509 *x509 = NULL;
|
||||
|
@ -491,6 +492,7 @@ int tls_set_certificate_der(struct tls *tls, enum tls_keytype keytype,
|
|||
return err;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the certificate and private key on a TLS context
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue