25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
655 B

  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. #include <openssl/rsa.h>
  10. #include <openssl/evp.h>
  11. int RSA_print(BIO *bio, const RSA *rsa, int indent) {
  12. EVP_PKEY *pkey = EVP_PKEY_new();
  13. int ret = pkey != NULL &&
  14. EVP_PKEY_set1_RSA(pkey, (RSA *)rsa) &&
  15. EVP_PKEY_print_private(bio, pkey, indent, NULL);
  16. EVP_PKEY_free(pkey);
  17. return ret;
  18. }