Lines Matching refs:cert
69 static int ssl_set_cert(CERT *c, X509 *x509);
70 static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey);
81 return ssl_set_cert(ssl->cert, x);
121 ret = ssl_set_pkey(ssl->cert, pkey);
127 static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey) {
170 ret = ssl_set_pkey(ssl->cert, pkey);
200 return ssl_set_cert(ctx->cert, x);
203 static int ssl_set_cert(CERT *c, X509 *x) {
221 /* don't fail for a cert/key mismatch, just free current private key
222 * (when switching to a different cert & key, first this function should
277 ret = ssl_set_pkey(ctx->cert, pkey);
301 return ssl_set_pkey(ctx->cert, pkey);
326 ssl->cert->key_method = key_method;
331 OPENSSL_free(ssl->cert->digest_nids);
333 ssl->cert->num_digest_nids = 0;
334 ssl->cert->digest_nids = BUF_memdup(digest_nids, num_digests*sizeof(int));
335 if (ssl->cert->digest_nids == NULL) {
340 ssl->cert->num_digest_nids = num_digests;
345 return ssl->cert->privatekey != NULL || ssl->cert->key_method != NULL;
349 if (ssl->cert->key_method != NULL) {
350 return ssl->cert->key_method->type(ssl);
352 return EVP_PKEY_id(ssl->cert->privatekey);
356 if (ssl->cert->key_method != NULL) {
357 return ssl->cert->key_method->max_signature_len(ssl);
359 return EVP_PKEY_size(ssl->cert->privatekey);
365 if (ssl->cert->key_method != NULL) {
366 return ssl->cert->key_method->sign(ssl, out, out_len, max_out, md, in,
371 EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new(ssl->cert->privatekey, NULL);
393 return ssl->cert->key_method->sign_complete(ssl, out, out_len, max_out);
399 if (ssl->cert->key_method != NULL) {
400 return ssl->cert->key_method->decrypt(ssl, out, out_len, max_out, in,
404 RSA *rsa = EVP_PKEY_get0_RSA(ssl->cert->privatekey);
422 return ssl->cert->key_method->decrypt_complete(ssl, out, out_len, max_out);