Giter Site home page Giter Site logo

BouncyCastle Error about oci-dotnet-sdk HOT 7 CLOSED

oracle avatar oracle commented on June 16, 2024
BouncyCastle Error

from oci-dotnet-sdk.

Comments (7)

github-anurag avatar github-anurag commented on June 16, 2024

Hi @i542873057
What version of the Dotnet SDK are you using?

from oci-dotnet-sdk.

i542873057 avatar i542873057 commented on June 16, 2024

Hi @i542873057
What version of the Dotnet SDK are you using?

Thank for your Reply

Version is 24.1.0
Installed by Nuget

from oci-dotnet-sdk.

github-anurag avatar github-anurag commented on June 16, 2024

@i542873057
It looks the SDK does not like the pem file you are using here. Can you share the process you used to create yours?

Preferred way for creating Pem keys:-
https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm

from oci-dotnet-sdk.

i542873057 avatar i542873057 commented on June 16, 2024

@i542873057
It looks the SDK does not like the pem file you are using here. Can you share the process you used to create yours?

Preferred way for creating Pem keys:-
https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm

My os version is centos 8
This is my steps:

  1. mkdir ~/.oci

  2. openssl genrsa -out ~/.oci/oci_api_key.pem 2048

  3. openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem

  4. move to console -->user setting---->api keys--->add api key then upload the oci_api_key_public.pem,it will show me the config content, and i copy that in to my linux path '~/.oci/config'

  5. modify the key_file params in config "~/.oci/oci_api_key.pem"

follow the Previous steps . Then i run my code and throw the "BouncyCastle Error" you see at the begin

from oci-dotnet-sdk.

github-anurag avatar github-anurag commented on June 16, 2024

Hi @i542873057
I cannot reproduce this on version 24.1.0 but we have this issue in older versions.
Can you again check the version of OCI.DotNetSDK.Common nuget package in your project?

$ dotnet list package
Project 'TestConsoleApp' has the following package references
   [net5.0]:
   Top-level Package                   Requested   Resolved
   > OCI.DotNetSDK.Common              24.1.0      24.1.0
   > OCI.DotNetSDK.Identity            24.1.0      24.1.0
   > OCI.DotNetSDK.ResourceSearch      24.1.0      24.1.0

from oci-dotnet-sdk.

jodoglevy avatar jodoglevy commented on June 16, 2024

@i542873057 looks like you are generating the API key locally yourself -- do you get the same issue if you generate the API key through the OCI Console, and use that key with the .NET SDK? See https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#two section 'Generating an API Signing Key (Console)' for how to do that.

from oci-dotnet-sdk.

i542873057 avatar i542873057 commented on June 16, 2024

@i542873057 looks like you are generating the API key locally yourself -- do you get the same issue if you generate the API key through the OCI Console, and use that key with the .NET SDK? See https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#two section 'Generating an API Signing Key (Console)' for how to do that.

Whoo~Thanks !
EveryThing is Ok when using the pem download from console

from oci-dotnet-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.