- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Getting error - java.security.InvalidKeyException:...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 08:30 AM - last edited on 03-29-2022 10:11 PM by support_s
03-29-2022 08:30 AM - last edited on 03-29-2022 10:11 PM by support_s
Getting error - java.security.InvalidKeyException: Private Key cannot be used to encrypt.
Hi
I am getting below error while I try to encrypt using RSA key on HPUX platform
java.security.InvalidKeyException: Private Key cannot be used to encrypt.
I didn't face any issue on Linux and Windows with Oracle JDK installed. Can anybody please suggest workaround for this issue. Code is legacy and I can't change existing functionality.
- Tags:
- Operating System
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 01:24 PM
03-29-2022 01:24 PM
Re: Getting error - java.security.InvalidKeyException: Private Key cannot be used to encry
> I am getting below error while I try to encrypt using RSA key [...]
"try to encrypt" what, _how_, exactly? As usual, showing actual
commands (or program statements) with their actual output can be more
helpful than vague descriptions ("try to encrypt") or interpretations.
> [...] on HPUX platform
uname -a
> java.security.InvalidKeyException: Private Key cannot be used to encrypt.
Java version?
I know nothing, but that message suggests (to me) that you've
specified a private key where you should have specified a public key.
> I didn't face any issue on Linux and Windows with Oracle JDK
> installed. [...]
I can't see what you did on those systems, either.
> Can anybody please suggest workaround for this issue. [...]
Knowing nothing, I might try a Web search for, say:
"java.security.InvalidKeyException: Private Key cannot be used to encrypt."
The Java motto: Write Once, Debug Everywhere.