• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/openssl/apps/

Lines Matching defs:exc

1219     SSL_EXCERT *exc = arg;
1231 if (!exc)
1238 while (exc->next)
1239 exc = exc->next;
1243 while (exc) {
1245 rv = SSL_check_chain(ssl, exc->cert, exc->key, exc->chain);
1247 X509_NAME_print_ex(bio_err, X509_get_subject_name(exc->cert), 0,
1253 SSL_use_certificate(ssl, exc->cert);
1254 SSL_use_PrivateKey(ssl, exc->key);
1260 if (exc->build_chain) {
1263 } else if (exc->chain)
1264 SSL_set1_chain(ssl, exc->chain);
1266 exc = exc->prev;
1271 void ssl_ctx_set_excert(SSL_CTX *ctx, SSL_EXCERT *exc)
1273 SSL_CTX_set_cert_cb(ctx, set_cert_cb, exc);
1278 SSL_EXCERT *exc;
1279 exc = OPENSSL_malloc(sizeof(SSL_EXCERT));
1280 if (!exc)
1282 exc->certfile = NULL;
1283 exc->keyfile = NULL;
1284 exc->chainfile = NULL;
1285 exc->cert = NULL;
1286 exc->key = NULL;
1287 exc->chain = NULL;
1288 exc->prev = NULL;
1289 exc->build_chain = 0;
1291 exc->next = *pexc;
1292 *pexc = exc;
1294 if (exc->next) {
1295 exc->certform = exc->next->certform;
1296 exc->keyform = exc->next->keyform;
1297 exc->next->prev = exc;
1299 exc->certform = FORMAT_PEM;
1300 exc->keyform = FORMAT_PEM;
1306 void ssl_excert_free(SSL_EXCERT *exc)
1309 while (exc) {
1310 if (exc->cert)
1311 X509_free(exc->cert);
1312 if (exc->key)
1313 EVP_PKEY_free(exc->key);
1314 if (exc->chain)
1315 sk_X509_pop_free(exc->chain, X509_free);
1316 curr = exc;
1317 exc = exc->next;
1324 SSL_EXCERT *exc = *pexc;
1325 if (!exc)
1328 if (!exc->certfile && !exc->next) {
1329 ssl_excert_free(exc);
1333 for (; exc; exc = exc->next) {
1334 if (!exc->certfile) {
1338 exc->cert = load_cert(err, exc->certfile, exc->certform,
1340 if (!exc->cert)
1342 if (exc->keyfile) {
1343 exc->key = load_key(err, exc->keyfile, exc->keyform,
1346 exc->key = load_key(err, exc->certfile, exc->certform,
1349 if (!exc->key)
1351 if (exc->chainfile) {
1352 exc->chain = load_certs(err,
1353 exc->chainfile, FORMAT_PEM,
1355 if (!exc->chain)
1366 SSL_EXCERT *exc = *pexc;
1368 if (!exc) {
1369 if (ssl_excert_prepend(&exc))
1370 *pexc = exc;
1382 if (exc->certfile && !ssl_excert_prepend(&exc)) {
1387 exc->certfile = argn;
1393 if (exc->keyfile) {
1398 exc->keyfile = argn;
1404 if (exc->chainfile) {
1409 exc->chainfile = argn;
1412 exc->build_chain = 1;
1418 exc->certform = str2fmt(argn);
1424 exc->keyform = str2fmt(argn);
1433 *pexc = exc;
1439 ssl_excert_free(exc);