Questions tagged [cer]

In .NET Framework, a constrained execution region (CER) defines an area in which the common language runtime (CLR) is constrained from throwing out-of-band exceptions that would prevent the code in the area from executing in its entirety.

A constrained execution region (CER) is part of a mechanism for authoring reliable managed code. A CER defines an area in which the common language runtime (CLR) is constrained from throwing out-of-band exceptions that would prevent the code in the area from executing in its entirety. Within that region, user code is constrained from executing code that would result in the throwing of out-of-band exceptions. (Excerpt from the MSDN library)

56 questions
50
votes
5 answers

Convert .cer certificate to .jks

I need to convert a .cer file to a .jks file. I saw a few questions about it, but haven't seen a solution to what I need. I don't need it in order to add it to my local certificates, but as a file to upload to a server. I also need to do it only…
arikabc
  • 675
  • 1
  • 6
  • 11
44
votes
2 answers

How to extract the RSA public key from a .cer and store it in a .pem using OpenSSL?

I have the requirement to extract the public key (RSA) from a *.cer file. I wish to extract the key and store it in a .pem file so I can use its value to encrypt values using jsencrypt. The following command converts a .cer to .pem: openssl x509…
Steven Anderson
  • 8,398
  • 4
  • 27
  • 32
40
votes
5 answers

Code demonstrating the importance of a Constrained Execution Region

Could anyone create a short sample that breaks, unless the [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] is applied? I just ran through this sample on MSDN and am unable to get it to break, even if I comment out the…
Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
18
votes
1 answer

Do C# try-finally CERs break in iterators?

Apparently, Constrained Execution Region guarantees do not apply to iterators (probably because of how they are implemented and all), but is this a bug or by design? [See the example below.] i.e. What are the rules on CERs being used with…
user541686
  • 205,094
  • 128
  • 528
  • 886
18
votes
2 answers

Convert .crt file to .cer and .key

I was asked to help converting a certificate for a renewal. I was given the domainname.crt file along with some intermediate .crt files, but no .key file. They want me to convert the CRT to both a .CER and a .KEY file. I have looked at the following…
user1970778
  • 361
  • 2
  • 5
  • 10
15
votes
1 answer

keytool import certificate java.util.IllegalFormatConversionException in linux

I am tring to create a keystore to be used in tomcat but I get the error "java.util.IllegalFormatConversionException: d != java.lang.String" using keytool. This happens only in linux (centos7) but not in windows. I created the keystore with keytool…
user2959635
  • 220
  • 1
  • 2
  • 9
11
votes
1 answer

Are .pem and .cer interchangeble?

I know .pem are base 64 encoded and .cer is the certificate with can be .pem encoded. Question: I have been using .cer in our application. Since the certificate is expriring, we got a new certificate in .pem format. Can we start using .pem as it is…
Arun
  • 153
  • 1
  • 1
  • 8
10
votes
4 answers

Signing .exe with .cer file (what is my certificate's name that signtool.exe is asking for?)

I have bought a certificate for my program. The website from which I bought it, sent me an .cer file (43-some-really-long-name-9962812767788.cer). No additional files were sent, but I'm almost 100% sure that I don't need anything more. When I click…
PolGraphic
  • 3,233
  • 11
  • 51
  • 108
9
votes
2 answers

Create SSLContext from private key and cer files

I have two files: mycer.cer mykey.key I need to create a SslContext to connect to another server via SSL using Java. I'm trying to find out how I can create the SslContext object directly from those files. This post may be duplicated, but I tried…
Marwan Jaber
  • 611
  • 11
  • 27
8
votes
2 answers

How can a SafeHandle be used in a P/Invoke signature that requires a null pointer in certain cases?

Hopefully this isn't too obscure for SO, but consider the following P/Invoke signature: [DllImport("odbc32.dll", CharSet = CharSet.Unicode)] internal static extern OdbcResult SQLAllocHandle( OdbcHandleType HandleType, IntPtr InputHandle, …
davidzarlengo
  • 820
  • 1
  • 5
  • 16
6
votes
1 answer

Can CERs be used to guarantee that finalize is never called?

We have a very tricky interop problem wherein the thread used to initialize a 3rd-party system has to be the same thread used to terminate it. Failure to do this results in a deadlock. We are performing interop from a WCF service hosted in IIS. …
Jeff
  • 2,701
  • 2
  • 22
  • 35
5
votes
3 answers

Can this unexpected behavior of PrepareConstrainedRegions and Thread.Abort be explained?

I was playing around with Constrained Execution Regions tonight to better round out my understanding of the finer details. I have used them on occasion before, but in those cases I mostly adhered strictly to established patterns. Anyway, I noticed…
Brian Gideon
  • 47,849
  • 13
  • 107
  • 150
4
votes
1 answer

How to generate a CRL (certificate revocation list) file

I'm using self-signed certificates for testing, how can I generate certificate revocation list to test cert verification? Has keytool in JDK provided such functionalities? Thanks!
Felix
  • 175
  • 1
  • 2
  • 7
4
votes
1 answer

Converting .cer to .jks using java

I wanted to convert a file with a .cer extension to .jks file. Can somebody please help me with this? I googled it but did not get much information. Even a tutorial or link would is fine. I guess Java Key Store is used. Thanks.
Vin
  • 148
  • 2
  • 15
3
votes
1 answer

How to obtain a Microsoft Certificate (*.cer & .pfx)?

In order to upload a service on Microsoft Azure Cloud there is a cer file required, to proof the identity. How can I purchase one for my company? Thanks,
Houman
  • 64,245
  • 87
  • 278
  • 460
1
2 3 4