• Home
  • Raw
  • Download

Lines Matching refs:kssl_ctx

1065 kssl_cget_tkt(	/* UPDATE */	KSSL_CTX *kssl_ctx,  in kssl_cget_tkt()  argument
1080 if (!kssl_ctx) in kssl_cget_tkt()
1086 else if (!kssl_ctx->service_host) in kssl_cget_tkt()
1102 kssl_ctx->service_host, in kssl_cget_tkt()
1103 (kssl_ctx->service_name)? kssl_ctx->service_name: KRB5SVC, in kssl_cget_tkt()
1108 kssl_ctx->service_host, in kssl_cget_tkt()
1109 (kssl_ctx->service_name)? kssl_ctx->service_name: in kssl_cget_tkt()
1140 kssl_ctx->enctype = krb5credsp->session.keytype; in kssl_cget_tkt()
1142 kssl_ctx->enctype = krb5credsp->keyblock.enctype; in kssl_cget_tkt()
1191 if (kssl_ctx_setkey(kssl_ctx, &krb5credsp->session)) in kssl_cget_tkt()
1197 if (kssl_ctx_setkey(kssl_ctx, &krb5credsp->keyblock)) in kssl_cget_tkt()
1207 kssl_ctx_show(kssl_ctx); in kssl_cget_tkt()
1313 kssl_sget_tkt( /* UPDATE */ KSSL_CTX *kssl_ctx, in kssl_sget_tkt() argument
1331 if (!kssl_ctx) in kssl_sget_tkt()
1339 printf("in kssl_sget_tkt(%s)\n", kstring(kssl_ctx->service_name)); in kssl_sget_tkt()
1374 (kssl_ctx->service_name)? kssl_ctx->service_name: KRB5SVC, in kssl_sget_tkt()
1404 if (kssl_ctx->keytab_file) in kssl_sget_tkt()
1406 krb5rc = krb5_kt_resolve(krb5context, kssl_ctx->keytab_file, in kssl_sget_tkt()
1525 else if (kssl_ctx_setprinc(kssl_ctx, KSSL_CLIENT, in kssl_sget_tkt()
1533 else if (kssl_ctx_setkey(kssl_ctx, krb5ticket->enc_part2->session)) in kssl_sget_tkt()
1546 kssl_ctx->enctype = krb5ticket->enc_part.enctype; in kssl_sget_tkt()
1554 kssl_ctx_show(kssl_ctx); in kssl_sget_tkt()
1578 kssl_ctx_free(KSSL_CTX *kssl_ctx) in kssl_ctx_free() argument
1580 if (kssl_ctx == NULL) return kssl_ctx; in kssl_ctx_free()
1582 if (kssl_ctx->key) OPENSSL_cleanse(kssl_ctx->key, in kssl_ctx_free()
1583 kssl_ctx->length); in kssl_ctx_free()
1584 if (kssl_ctx->key) kssl_free(kssl_ctx->key); in kssl_ctx_free()
1585 if (kssl_ctx->client_princ) kssl_free(kssl_ctx->client_princ); in kssl_ctx_free()
1586 if (kssl_ctx->service_host) kssl_free(kssl_ctx->service_host); in kssl_ctx_free()
1587 if (kssl_ctx->service_name) kssl_free(kssl_ctx->service_name); in kssl_ctx_free()
1588 if (kssl_ctx->keytab_file) kssl_free(kssl_ctx->keytab_file); in kssl_ctx_free()
1590 kssl_free(kssl_ctx); in kssl_ctx_free()
1600 kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which, in kssl_ctx_setprinc() argument
1607 if (kssl_ctx == NULL || entity == NULL) return KSSL_CTX_ERR; in kssl_ctx_setprinc()
1611 case KSSL_CLIENT: princ = &kssl_ctx->client_princ; break; in kssl_ctx_setprinc()
1612 case KSSL_SERVER: princ = &kssl_ctx->service_host; break; in kssl_ctx_setprinc()
1657 kssl_ctx_setstring(KSSL_CTX *kssl_ctx, int which, char *text) in kssl_ctx_setstring() argument
1661 if (!kssl_ctx) return KSSL_CTX_ERR; in kssl_ctx_setstring()
1665 case KSSL_SERVICE: string = &kssl_ctx->service_name; break; in kssl_ctx_setstring()
1666 case KSSL_SERVER: string = &kssl_ctx->service_host; break; in kssl_ctx_setstring()
1667 case KSSL_CLIENT: string = &kssl_ctx->client_princ; break; in kssl_ctx_setstring()
1668 case KSSL_KEYTAB: string = &kssl_ctx->keytab_file; break; in kssl_ctx_setstring()
1692 kssl_ctx_setkey(KSSL_CTX *kssl_ctx, krb5_keyblock *session) in kssl_ctx_setkey() argument
1698 if (!kssl_ctx) return KSSL_CTX_ERR; in kssl_ctx_setkey()
1700 if (kssl_ctx->key) in kssl_ctx_setkey()
1702 OPENSSL_cleanse(kssl_ctx->key, kssl_ctx->length); in kssl_ctx_setkey()
1703 kssl_free(kssl_ctx->key); in kssl_ctx_setkey()
1718 kssl_ctx->enctype = enctype; in kssl_ctx_setkey()
1719 kssl_ctx->length = length; in kssl_ctx_setkey()
1723 kssl_ctx->enctype = ENCTYPE_UNKNOWN; in kssl_ctx_setkey()
1724 kssl_ctx->length = 0; in kssl_ctx_setkey()
1728 if ((kssl_ctx->key = in kssl_ctx_setkey()
1729 (krb5_octet FAR *) kssl_calloc(1, kssl_ctx->length)) == NULL) in kssl_ctx_setkey()
1731 kssl_ctx->length = 0; in kssl_ctx_setkey()
1735 memcpy(kssl_ctx->key, contents, length); in kssl_ctx_setkey()
1744 kssl_ctx_show(KSSL_CTX *kssl_ctx) in kssl_ctx_show() argument
1749 if (kssl_ctx == NULL) in kssl_ctx_show()
1755 printf("%p\n", (void *)kssl_ctx); in kssl_ctx_show()
1758 (kssl_ctx->service_name)? kssl_ctx->service_name: "NULL"); in kssl_ctx_show()
1760 (kssl_ctx->client_princ)? kssl_ctx->client_princ: "NULL"); in kssl_ctx_show()
1762 (kssl_ctx->service_host)? kssl_ctx->service_host: "NULL"); in kssl_ctx_show()
1764 (kssl_ctx->keytab_file)? kssl_ctx->keytab_file: "NULL"); in kssl_ctx_show()
1766 kssl_ctx->enctype, kssl_ctx->length); in kssl_ctx_show()
1768 for (i=0; i < kssl_ctx->length && kssl_ctx->key; i++) in kssl_ctx_show()
1770 printf("%02x", kssl_ctx->key[i]); in kssl_ctx_show()
1777 kssl_keytab_is_available(KSSL_CTX *kssl_ctx) in kssl_keytab_is_available() argument
1791 if (kssl_ctx->keytab_file) in kssl_keytab_is_available()
1793 krb5rc = krb5_kt_resolve(krb5context, kssl_ctx->keytab_file, in kssl_keytab_is_available()
1807 kssl_ctx->service_name ? kssl_ctx->service_name: KRB5SVC, in kssl_keytab_is_available()
1832 kssl_tgt_is_available(KSSL_CTX *kssl_ctx) in kssl_tgt_is_available() argument
1842 if (!kssl_ctx) in kssl_tgt_is_available()
1845 if (!kssl_ctx->service_host) in kssl_tgt_is_available()
1852 kssl_ctx->service_host, in kssl_tgt_is_available()
1853 … (kssl_ctx->service_name)? kssl_ctx->service_name: KRB5SVC, in kssl_tgt_is_available()
1872 kssl_ctx_show(kssl_ctx); in kssl_tgt_is_available()
1996 /* IN */ KSSL_CTX *kssl_ctx, in kssl_check_authent() argument
2079 if (!EVP_CipherInit(&ciph_ctx,enc,kssl_ctx->key,iv,0)) in kssl_check_authent()