aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/rtcpeerconnection/generatecertificate/index.html
blob: d516a3435f763d78a8ad9489af1baea13fef8501 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: RTCPeerConnection.generateCertificate()
slug: Web/API/RTCPeerConnection/generateCertificate
translation_of: Web/API/RTCPeerConnection/generateCertificate
---
<p>{{APIRef("WebRTC")}}</p>

<p>{{domxref("RTCPeerConnection")}} 인터페이스의 <strong><code>generateCertificate()</code></strong> 메소드는 X.509 인증서와 해당하는 개인 키를 생성하고 저장합니다. 그리고 접근이 가능한 {{domxref("RTCCertificate")}}를 반환합니다.</p>

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox">var <em>cert</em> = RTCPeerConnection.generateCertificate(<em>keygenAlgorithm</em>)</pre>

<h3 id="매개변수">매개변수</h3>

<dl>
 <dt><code>keygenAlgorithm</code></dt>
 <dd>키를 생성하는데 사용하는 알고리즘을 식별하는 {{domxref("DOMString")}}입니다.</dd>
</dl>

<div class="note">
<p><code>RTCPeerConnection.generateCertificate()</code> 은 정적인 메소드로, 따라서 인스턴스가 아닌 <code>RTCPeerConnection</code> 인터페이스에서 항상 호출됩니다.</p>
</div>

<h3 id="반환_값">반환 값</h3>

<p>{{domxref("RTCCertificate")}} 객체에 대한 참조 값입니다.</p>

<h3 id="예제">예제</h3>

<pre class="brush: js">RTCPeerConnection.generateCertificate({
    name: 'RSASSA-PKCS1-v1_5',
    hash: 'SHA-256',
    modulusLength: 2048,
    publicExponent: new Uint8Array([1, 0, 1])
}).then(function(cert) {
  var pc = new RTCPeerConnection({certificates: [cert]});
});</pre>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">명세</th>
   <th scope="col">상태</th>
   <th scope="col">코멘트</th>
  </tr>
  <tr>
   <td>{{SpecName('WebRTC 1.0', '#widl-RTCPeerConnection-generateCertificate-Promise-RTCCertificate--AlgorithmIdentifier-keygenAlgorithm', 'generateCertificate()')}}</td>
   <td>{{Spec2('WebRTC 1.0')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>



<p>{{Compat("api.RTCPeerConnection.generateCertificate")}}</p>

<h2 id="참조">참조</h2>

<ul>
 <li><a href="/en-US/docs/Web/API/ServiceWorker_API/Using_Service_Workers">Using Service Workers</a></li>
 <li>{{domxref("Cache")}}</li>
 <li>{{domxref("WorkerGlobalScope.caches")}}</li>
</ul>