Home | History | Annotate | Download | only in libkeymaster

Lines Matching defs:rsa

27 #include <openssl/rsa.h>
63 void operator()(RSA* p) const {
67 typedef UniquePtr<RSA, RSA_Delete> Unique_RSA;
168 RSA* rsa = pkey.get()->pkey.rsa;
169 if (rsa == NULL) {
170 logOpenSSLError("get rsa key format");
176 metadata.lenpubmod = BN_bn2bin(rsa->n, kbuf + key_len);
189 metadata.lenpubexp = BN_bn2bin(rsa->e, kbuf + key_len);
192 if ((rsa->p != NULL) && (rsa->q != NULL) && (rsa->dmp1 != NULL) &&
193 (rsa->dmq1 != NULL) && (rsa->iqmp != NULL))
196 metadata.rsacrtpriv.lenp = BN_bn2bin(rsa->p, kbuf + key_len);
198 metadata.rsacrtpriv.lenq = BN_bn2bin(rsa->q, kbuf + key_len);
200 metadata.rsacrtpriv.lendp = BN_bn2bin(rsa->dmp1, kbuf + key_len);
202 metadata.rsacrtpriv.lendq = BN_bn2bin(rsa->dmq1, kbuf + key_len);
204 metadata.rsacrtpriv.lenqinv = BN_bn2bin(rsa->iqmp, kbuf + key_len);
208 metadata.rsapriv.lenpriexp = BN_bn2bin(rsa->p, kbuf + key_len);
281 /* assign to RSA */
282 Unique_RSA rsa(RSA_new());
283 if (rsa.get() == NULL) {
284 logOpenSSLError("rsa.get");
288 RSA* rsa_tmp = rsa.get();
300 if (EVP_PKEY_assign_RSA(pkey.get(), rsa.get()) == 0) {
301 logOpenSSLError("assing RSA to EVP_PKEY");
304 OWNERSHIP_TRANSFERRED(rsa);