Lines Matching refs:key
30 RSAPublicKey* key = (RSAPublicKey*) VbExMalloc(sizeof(RSAPublicKey)); in RSAPublicKeyNew() local
31 key->n = NULL; in RSAPublicKeyNew()
32 key->rr = NULL; in RSAPublicKeyNew()
33 key->len = 0; in RSAPublicKeyNew()
34 key->algorithm = kNumAlgorithms; in RSAPublicKeyNew()
35 return key; in RSAPublicKeyNew()
38 void RSAPublicKeyFree(RSAPublicKey* key) { in RSAPublicKeyFree() argument
39 if (key) { in RSAPublicKeyFree()
40 if (key->n) in RSAPublicKeyFree()
41 VbExFree(key->n); in RSAPublicKeyFree()
42 if (key->rr) in RSAPublicKeyFree()
43 VbExFree(key->rr); in RSAPublicKeyFree()
44 VbExFree(key); in RSAPublicKeyFree()
49 RSAPublicKey* key = RSAPublicKeyNew(); in RSAPublicKeyFromBuf() local
55 StatefulMemcpy(&st, &key->len, sizeof(key->len)); in RSAPublicKeyFromBuf()
57 key_len = key->len; in RSAPublicKeyFromBuf()
65 RSAPublicKeyFree(key); in RSAPublicKeyFromBuf()
69 key->n = (uint32_t*) VbExMalloc(key_len); in RSAPublicKeyFromBuf()
70 key->rr = (uint32_t*) VbExMalloc(key_len); in RSAPublicKeyFromBuf()
72 StatefulMemcpy(&st, &key->n0inv, sizeof(key->n0inv)); in RSAPublicKeyFromBuf()
73 StatefulMemcpy(&st, key->n, key_len); in RSAPublicKeyFromBuf()
74 StatefulMemcpy(&st, key->rr, key_len); in RSAPublicKeyFromBuf()
76 RSAPublicKeyFree(key); in RSAPublicKeyFromBuf()
80 return key; in RSAPublicKeyFromBuf()
84 const RSAPublicKey* key, in RSAVerifyBinary_f() argument
101 if (key_blob && !key) in RSAVerifyBinary_f()
103 else if (!key_blob && key) in RSAVerifyBinary_f()
104 verification_key = (RSAPublicKey*) key; /* Supress const warning. */ in RSAVerifyBinary_f()
117 if (!key) in RSAVerifyBinary_f()
125 const RSAPublicKey* key, in RSAVerifyBinaryWithDigest_f() argument
140 if (key_blob && !key) in RSAVerifyBinaryWithDigest_f()
142 else if (!key_blob && key) in RSAVerifyBinaryWithDigest_f()
143 verification_key = (RSAPublicKey*) key; /* Supress const warning. */ in RSAVerifyBinaryWithDigest_f()
154 if (!key) in RSAVerifyBinaryWithDigest_f()