• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2006-2017 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the OpenSSL license (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9 
10 #include <openssl/rsa.h>
11 
12 #include <openssl/evp.h>
13 
14 
RSA_print(BIO * bio,const RSA * rsa,int indent)15 int RSA_print(BIO *bio, const RSA *rsa, int indent) {
16   EVP_PKEY *pkey = EVP_PKEY_new();
17   int ret = pkey != NULL &&
18             EVP_PKEY_set1_RSA(pkey, (RSA *)rsa) &&
19             EVP_PKEY_print_private(bio, pkey, indent, NULL);
20   EVP_PKEY_free(pkey);
21   return ret;
22 }
23