1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
#pike 8.1 
 
import Standards.ASN1.Types; 
 
inherit Standards.PKCS.Certificate; 
 
//! Return the certificate issuer RDN from a certificate string. 
//! 
//! @param cert 
//! A string containing an X509 certificate. 
//! 
//! Note that the certificate usually must be decoded using 
//! @[Standards.PEM.simple_decode()]. 
//! 
//! @returns 
//!  An Standards.ASN1.Sequence object containing the certificate issuer 
//!  Distinguished Name (DN). 
//! 
//! @deprecated Standards.X509.decode_certificate 
Sequence get_certificate_issuer(string cert) 
{ 
  return Standards.X509.decode_certificate(cert)->issuer; 
} 
 
//! Return the certificate subject RDN from a certificate string. 
//! 
//! @param cert 
//! A string containing an X509 certificate. 
//! 
//! Note that the certificate usually must be decoded using 
//! @[PEM.simpe_decode()]. 
//! 
//! @returns 
//!  An Standards.ASN1.Sequence object containing the certificate subject 
//!  Distinguished Name (DN). 
//! 
//! @deprecated Standards.X509.decode_certificate 
Sequence get_certificate_subject(string cert) 
{ 
  return Standards.X509.decode_certificate(cert)->subject; 
}