RSA 키 길이 문제의 자바 에러 해결 방법
Java Algorithm constraints check failed on key RSA with size of 1024bits
위와 같은 에러가 발생하며, SSL 통신이 불가능한 문제가 발견되었다.
해결책은 두 가지인데,
1. 2048bits 길이의 인증서로 교체
2. 자바 보안 설정 변경
나는 이 중에 자바 보안 설정을 변경하였다.
GPT는 권장하지 않는다고 하더라.
JAVA/~/lib/security에 가면 java.security 라는 파일이 있는데 여기서 RSA keySize 관련 설정을 변경하면 된다.
... RSA keySize < 2048 ... 이렇게 되어있다.
근데 2048을 1024로 변경해도 자바에서 실행할 때 계속 2048 길이를 비교했는데,
삽질 결과 /etc/crypto-policies/back-ends/java.config 가 최종적으로 모든 설정을 덮어쓴다는 것을 알게 되었다.
* java에 파라미터로 -Djava.security.debug=certpath을 넣어주면 어떤 값이 적용되는지 확인 가능
결론. java.security를 설정해도 설정값이 변하지 않는다면, java.config 파일을 변경해라.
Java Algorithm constraints check failed on key RSA with size of 1024bits
After generating java keystore with: -keyalg RSA -keysize 2048 and configuring the java.security policy with: jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySi...
stackoverflow.com
'how to' 카테고리의 다른 글
how to fix Error response from daemon: unable to create manifests file: NotFound: content digest (0) | 2025.03.31 |
---|---|
how to set platform and docker pull (0) | 2024.10.23 |
how to install docker standalone (0) | 2024.10.11 |
how to set "CyberChef" in synology using docker. (1) | 2024.04.22 |
how to use Dockerfile (0) | 2023.11.03 |
how to use pwndocker (0) | 2023.08.22 |
how to Copy the highlighted source code from visual studio to word (0) | 2023.07.23 |
how to solve "adb push" or "adb install" not working (0) | 2023.05.25 |
how to fix "Error message: crypto_alg: ARIA-CBC: not found" in openVPN (0) | 2023.04.25 |
how to set ssl certificate using "Let's encrypt" in nginx (0) | 2023.04.12 |
댓글