Lines Matching defs:pbk
1060 public_key_obj_t *pbk;
1244 pbk = calloc(1, sizeof (public_key_obj_t));
1245 if (pbk == NULL) {
1250 new_object->object_class_u.public_key = pbk;
1276 KEY_PUB_RSA_MOD(pbk));
1279 KEY_PUB_RSA_PUBEXPO(pbk));
1287 KEY_PUB_RSA_MOD_BITS(pbk) = modulus_bits;
1291 KEY_PUB_RSA_MOD_BITS(pbk) =
1292 bigint_bitlen(KEY_PUB_RSA_MOD(pbk));
1307 copy_bigint_attr(&prime, KEY_PUB_DSA_PRIME(pbk));
1309 copy_bigint_attr(&subprime, KEY_PUB_DSA_SUBPRIME(pbk));
1311 copy_bigint_attr(&base, KEY_PUB_DSA_BASE(pbk));
1313 copy_bigint_attr(&value, KEY_PUB_DSA_VALUE(pbk));
1323 copy_bigint_attr(&prime, KEY_PUB_DH_PRIME(pbk));
1325 copy_bigint_attr(&base, KEY_PUB_DH_BASE(pbk));
1327 copy_bigint_attr(&value, KEY_PUB_DH_VALUE(pbk));
1337 copy_bigint_attr(&point, KEY_PUB_EC_POINT(pbk));
3343 free_public_key_attr(public_key_obj_t *pbk, CK_KEY_TYPE key_type)
3345 if (pbk == NULL) {
3351 bigint_attr_cleanup(KEY_PUB_RSA_MOD(pbk));
3352 bigint_attr_cleanup(KEY_PUB_RSA_PUBEXPO(pbk));
3355 bigint_attr_cleanup(KEY_PUB_DSA_PRIME(pbk));
3356 bigint_attr_cleanup(KEY_PUB_DSA_SUBPRIME(pbk));
3357 bigint_attr_cleanup(KEY_PUB_DSA_BASE(pbk));
3358 bigint_attr_cleanup(KEY_PUB_DSA_VALUE(pbk));
3363 free(pbk);
3372 public_key_obj_t *pbk;
3375 pbk = calloc(1, sizeof (public_key_obj_t));
3376 if (pbk == NULL) {
3382 (void) memcpy(KEY_PUB_RSA(pbk),
3386 rv = copy_bigint(KEY_PUB_RSA_MOD(pbk),
3389 free_public_key_attr(pbk, key_type);
3393 rv = copy_bigint(KEY_PUB_RSA_PUBEXPO(pbk),
3396 free_public_key_attr(pbk, key_type);
3401 (void) memcpy(KEY_PUB_DSA(pbk),
3406 rv = copy_bigint(KEY_PUB_DSA_PRIME(pbk),
3409 free_public_key_attr(pbk, key_type);
3414 rv = copy_bigint(KEY_PUB_DSA_SUBPRIME(pbk),
3417 free_public_key_attr(pbk, key_type);
3422 rv = copy_bigint(KEY_PUB_DSA_BASE(pbk),
3425 free_public_key_attr(pbk, key_type);
3430 rv = copy_bigint(KEY_PUB_DSA_VALUE(pbk),
3433 free_public_key_attr(pbk, key_type);
3440 *new_pub_key_obj_p = pbk;
3446 free_private_key_attr(private_key_obj_t *pbk, CK_KEY_TYPE key_type)
3448 if (pbk == NULL) {
3454 bigint_attr_cleanup(KEY_PRI_RSA_MOD(pbk));
3455 bigint_attr_cleanup(KEY_PRI_RSA_PUBEXPO(pbk));
3456 bigint_attr_cleanup(KEY_PRI_RSA_PRIEXPO(pbk));
3457 bigint_attr_cleanup(KEY_PRI_RSA_PRIME1(pbk));
3458 bigint_attr_cleanup(KEY_PRI_RSA_PRIME2(pbk));
3459 bigint_attr_cleanup(KEY_PRI_RSA_EXPO1(pbk));
3460 bigint_attr_cleanup(KEY_PRI_RSA_EXPO2(pbk));
3461 bigint_attr_cleanup(KEY_PRI_RSA_COEF(pbk));
3464 bigint_attr_cleanup(KEY_PRI_DSA_PRIME(pbk));
3465 bigint_attr_cleanup(KEY_PRI_DSA_SUBPRIME(pbk));
3466 bigint_attr_cleanup(KEY_PRI_DSA_BASE(pbk));
3467 bigint_attr_cleanup(KEY_PRI_DSA_VALUE(pbk));
3472 free(pbk);
3480 private_key_obj_t *pbk;
3482 pbk = calloc(1, sizeof (private_key_obj_t));
3483 if (pbk == NULL) {
3489 (void) memcpy(KEY_PRI_RSA(pbk),
3493 rv = copy_bigint(KEY_PRI_RSA_MOD(pbk),
3496 free_private_key_attr(pbk, key_type);
3500 rv = copy_bigint(KEY_PRI_RSA_PUBEXPO(pbk),
3503 free_private_key_attr(pbk, key_type);
3507 rv = copy_bigint(KEY_PRI_RSA_PRIEXPO(pbk),
3510 free_private_key_attr(pbk, key_type);
3514 rv = copy_bigint(KEY_PRI_RSA_PRIME1(pbk),
3517 free_private_key_attr(pbk, key_type);
3521 rv = copy_bigint(KEY_PRI_RSA_PRIME2(pbk),
3524 free_private_key_attr(pbk, key_type);
3528 rv = copy_bigint(KEY_PRI_RSA_EXPO1(pbk),
3531 free_private_key_attr(pbk, key_type);
3535 rv = copy_bigint(KEY_PRI_RSA_EXPO2(pbk),
3538 free_private_key_attr(pbk, key_type);
3542 rv = copy_bigint(KEY_PRI_RSA_COEF(pbk),
3545 free_private_key_attr(pbk, key_type);
3550 (void) memcpy(KEY_PRI_DSA(pbk),
3555 rv = copy_bigint(KEY_PRI_DSA_PRIME(pbk),
3558 free_private_key_attr(pbk, key_type);
3563 rv = copy_bigint(KEY_PRI_DSA_SUBPRIME(pbk),
3566 free_private_key_attr(pbk, key_type);
3571 rv = copy_bigint(KEY_PRI_DSA_BASE(pbk),
3574 free_private_key_attr(pbk, key_type);
3579 rv = copy_bigint(KEY_PRI_DSA_VALUE(pbk),
3582 free_private_key_attr(pbk, key_type);
3589 *new_pri_key_obj_p = pbk;