Skip to content

Commit 5713dc5

Browse files
committed
Fix one more raising location in SSLCipherSelector
1 parent 82371f5 commit 5713dc5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/ssl/SSLCipherSelector.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,13 @@ private static void selectSingle(Node node, String cipherString, List<SSLCipher>
120120
} else if (cipherString.startsWith("@SECLEVEL=")) {
121121
throw PRaiseNode.raiseStatic(node, NotImplementedError, toTruffleStringUncached("@SECLEVEL not implemented"));
122122
} else {
123-
throw PConstructAndRaiseNode.raiseUncachedSSLError(ErrorMessages.NO_CIPHER_CAN_BE_SELECTED);
123+
EncapsulatingNodeReference nodeRef = EncapsulatingNodeReference.getCurrent();
124+
Node prev = nodeRef.set(node);
125+
try {
126+
throw PConstructAndRaiseNode.raiseUncachedSSLError(ErrorMessages.NO_CIPHER_CAN_BE_SELECTED);
127+
} finally {
128+
nodeRef.set(prev);
129+
}
124130
}
125131
} else if (cipherString.equals("DEFAULT")) {
126132
selectCiphersFromList(node, "ALL:!COMPLEMENTOFDEFAULT:!eNULL", selected, deleted);

0 commit comments

Comments
 (0)